Skip to content

fix: order temporal migration operations under the toposort - #839

Merged
zachdaniel merged 2 commits into
ash-project:temporalfrom
matt-beanland:temporal-ordering
Aug 24, 2026
Merged

fix: order temporal migration operations under the toposort#839
zachdaniel merged 2 commits into
ash-project:temporalfrom
matt-beanland:temporal-ordering

Conversation

@matt-beanland

@matt-beanland matt-beanland commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Contributor checklist

  • I accept the AI Policy, or AI was not used in the creation of this PR.
  • Bug fixes include regression tests
  • Chores
  • Documentation changes
  • Features include unit/acceptance tests
  • Refactoring
  • Update dependencies

Stacked on #838.

Problem: AddPrimaryKey and AddTemporalForeignKey declared no dependencies, so the toposort that replaced pairwise after?/2 ordering in #798 generated migration ALTER TABLE tier ADD PRIMARY KEY before CREATE TABLE tier.

Fix: declare each operation's actual prerequisites as requires facts, so the generator can't emit a forward reference.

Migration regeneration is subject of next PR in the stack.

@zachdaniel green locally, also credo and format ok. Second of ash_postgres stack likely 4 PR's, stacks on #838

@matt-beanland
matt-beanland changed the base branch from main to temporal August 24, 2026 08:05
@zachdaniel
zachdaniel merged commit 8d19164 into ash-project:temporal Aug 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants