Skip to content

fix: restore columns before custom indexes on rollback - #912

Merged
zachdaniel merged 1 commit into
ash-project:mainfrom
jeffhuen:fix-custom-index-column-rollback
Oct 29, 2026
Merged

zachdaniel merged 1 commit into
ash-project:mainfrom
jeffhuen:fix-custom-index-column-rollback

Conversation

@jeffhuen

Copy link
Copy Markdown
Contributor

Removing a column and its custom index can generate a rollback that recreates the index before the column exists.

Make RemoveAttribute depend on index removal so rollback restores the column first. Normalize string and atom field names with the existing helper so their dependency keys match, including during renames. SQL-expression dependencies remain unsupported.

Add regressions for operation ordering and generated up and down migrations. The generator regression fails before the fix and passes afterward.

Related to #159.

@zachdaniel

Copy link
Copy Markdown
Contributor

LGTM. Please LMK when its not a draft as GH won't send me a notification for that.

@jeffhuen
jeffhuen marked this pull request as ready for review October 29, 2026 00:41
@jeffhuen

Copy link
Copy Markdown
Contributor Author

Ready for review now, @zachdaniel. The patch is unchanged at 642d848.

@zachdaniel
zachdaniel merged commit 849217e into ash-project:main Oct 29, 2026
@zachdaniel

Copy link
Copy Markdown
Contributor

🚀 Thank you for your contribution! 🚀

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