-
Notifications
You must be signed in to change notification settings - Fork 103
Duplicate unique and check constraints correctly #466
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
Conversation
It is highly likely we need to adjust the check constraint migrations as well. I will address those issues in a follow-up PR. |
I pushed the multi-column duplicator change. I also tested it with the new check constraint PR and it fixes the problem with the example. |
Co-authored-by: Andrew Farries <andyrb@gmail.com>
I have split out the statement builder from the duplicator and added unit tests to make sure we generate the correct SQL statements for constraints. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good. Thanks for adding the tests for the duplicators.
Would it be possible to combine the ColumnDuplicator
and the ColumnGroupDuplicator
so that a duplicator could be created with one or more columns?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great 🎉
Approved with one more suggesion. 👍
Updated the PR with the suggestion, and merging once the tests pass. |
Previously, unique and check constraints with multiple columns were not duplicated correctly.
We had two issues:
Required by #464