Skip to content
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

Preserve foreign key constraints when changing a column's type #232

Merged
merged 3 commits into from
Jan 15, 2024

Conversation

andrew-farries
Copy link
Collaborator

@andrew-farries andrew-farries commented Jan 15, 2024

Preserve any foreign key constraints defined on columns when changing a column's type.

Uses the Duplicator type added in #230 in the 'change type' operation to ensure that FK constraints are preserved when the column is duplicated for backfilling.

#230 did the same thing for preserving FK constraints when a column has a NOT NULL constraint added.

Part of #227

Base automatically changed from duplication-of-fk-columns to main January 15, 2024 15:56
Allow `Duplicator` to duplicate a column but with a different type.
Ensure that changing a column's type preserves any foreign keys defined
on the column.
@andrew-farries andrew-farries merged commit fc7370f into main Jan 15, 2024
24 checks passed
@andrew-farries andrew-farries deleted the preserve-fks-on-change-type branch January 15, 2024 16:01
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.

None yet

2 participants