Skip to content

Add support for alter_table set check operations in multi-operation migrations #622

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 23, 2025

Conversation

andrew-farries
Copy link
Collaborator

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

Add testcases for:

  • rename table, set CHECK constraint
  • rename table, rename column, set CHECK constraint

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

Part of #239

When adding a `CHECK` constraint to a table, take the table name from
the virtual schema rathe than the operation. This ensures that the
correct table name is used even if a preceding operation has renamed the
table.
@andrew-farries andrew-farries merged commit c09619a into main Jan 23, 2025
28 checks passed
@andrew-farries andrew-farries deleted the multi-op-support-for-set-check branch January 23, 2025 16:35
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