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

Convert DROP CONSTRAINT SQL into OpDropMultiColumnConstraint operations #536

Merged
merged 3 commits into from
Dec 16, 2024

Conversation

ryanslade
Copy link
Collaborator

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