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 column properties on drop constraint operation #253

Merged
merged 8 commits into from
Jan 26, 2024

Conversation

andrew-farries
Copy link
Collaborator

Ensure that properties of a column are preserved when duplicating a column for backfilling as part of the drop constraint operation.

The properties that are preserved are:

  • NOT NULL
  • DEFAULT
  • FOREIGN KEY constraints
  • CHECK constraints
  • UNIQUE constraints

Part of #227

Base automatically changed from validate-constraint-existence-before-drop to main January 26, 2024 11:47
Allow the column duplictor to be configured to duplicate a column
ignoring a particular named constraint.
Dropping a (unique) constraint from a column preserves the default value
present on the column.
Dropping a (unique) constraint from a column preserves any foreign key
constraints on the column.
Dropping a (unique) constraint from a column preserves any `CHECK`
constraints on the column.
Dropping a (check) constraint from a column preserves any `UNIQUE`
constraints on the column.
Dropping a (unique) constraint from a column preserves any `NOT NULL`
constraints on the column.
Column duplication for all operations is now done by the
`RenameDuplicatedColumn` function.
@andrew-farries andrew-farries force-pushed the preserve-column-properties-on-drop-constraint branch from 78168fe to 198d008 Compare January 26, 2024 11:48
@andrew-farries andrew-farries merged commit 04de471 into main Jan 26, 2024
26 checks passed
@andrew-farries andrew-farries deleted the preserve-column-properties-on-drop-constraint branch January 26, 2024 11:49
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