-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sql: add support for NOT VALID Foreign Key constraints
Implemented the support of not validating an ALTER TABLE foreign key constraint to a table. Within alter_table.go we set the validity of the foreign key reference to be unvalidated, and within shema_changer.go we then check the case where the foreign key being added is unvalidated and do not check its validity. This allows users to create a FK reference between two tables whose rows don't comply with the constraint when it's first added. Release note (sql change): Support NOT VALID for Foreign Key constraints. Update logic tests to more thoroughly test the added support of NOT VALID.
- Loading branch information
Tyler314
committed
Jul 10, 2019
1 parent
d9f6f15
commit 81f1036
Showing
9 changed files
with
637 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.