Skip to content

Fix orphan table drop ordering#730

Merged
zachdaniel merged 1 commit intoash-project:mainfrom
jechol:fix/drop-orphan-table-ordering
Apr 9, 2026
Merged

Fix orphan table drop ordering#730
zachdaniel merged 1 commit intoash-project:mainfrom
jechol:fix/drop-orphan-table-ordering

Conversation

@jechol
Copy link
Copy Markdown
Contributor

@jechol jechol commented Apr 9, 2026

Fixes drop-table migration ordering for removed resources with foreign key dependencies.

Previously, orphan tables could be dropped in parent-first order, which caused ecto.migrate to fail. This change orders orphan table drops so dependent tables are removed before the tables they reference.

Includes a regression test for a chained dependency case.

Contributor checklist

Leave anything that you believe does not apply unchecked.

  • 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

@zachdaniel zachdaniel merged commit 2136218 into ash-project:main Apr 9, 2026
100 of 110 checks passed
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