Skip to content

Conversation

ryanslade
Copy link
Contributor

Convert DROP CONSTRAINT SQL into an OpDropMultiColumnConstraint.
Because we are unable to infer the columns involved, placeholder migrations are used.

SQL statements like the following are supported:

ALTER TABLE foo DROP CONSTRAINT constraint_foo
ALTER TABLE foo DROP CONSTRAINT IF EXISTS constraint_foo
ALTER TABLE foo DROP CONSTRAINT IF EXISTS constraint_foo RESTRICT

CASCADE is currently not supported and will fall back to raw SQL

Part of #504

@ryanslade ryanslade merged commit f4c17ff into main Dec 16, 2024
28 checks passed
@ryanslade ryanslade deleted the rs/drop-multi-column-constraints branch December 16, 2024 15:06
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