Skip to content

Conversation

andrew-farries
Copy link
Collaborator

Ensure that multi-operation migrations combining alter_column operations setting column defaults work in combination with other operations.

Add testcases for:

  • rename table, set column default
  • rename table, rename column, set default

Previously these migrations would fail as the alter_column operation was unaware of the changes made by the preceding operation.

Part of #239

Take the name of the table that should have a column default modified
form the virtual schema, not the operation. This ensures the operation
is aware of any table renames performed by a previous operation in the
same migration.
Take the name of the column that should have a its default modified
form the virtual schema, not the operation. This ensures the operation
is aware of any column renames performed by a previous operation in the
same migration.
@andrew-farries andrew-farries force-pushed the support-set-default-in-multi-op-migrations branch from eb34fef to fd2737f Compare January 22, 2025 12:01
@andrew-farries andrew-farries marked this pull request as ready for review January 22, 2025 12:20
@andrew-farries andrew-farries merged commit bcb429f into main Jan 22, 2025
28 checks passed
@andrew-farries andrew-farries deleted the support-set-default-in-multi-op-migrations branch January 22, 2025 15:51
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