-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Strengthen assertions for tests that check preservation of
UNIQUE
c…
…onstraints (#277) Strengthen the tests that check for preservation of `UNIQUE` constraints when a column is duplicated so that they can check for the failure case in #273. It's not enough to test that the column does not accept duplicate values after the migration completes. Both a unique index and a unique constraint will have that effect but we need to ensure that the **constraint** is present on the table once the migration completes. Duplicating a `UNIQUE` constraint is a two-step process, first creating a `UNIQUE` index on migration start and then upgrading the index to a constraint on migration completion. #273 occurs when this upgrade fails and the column is left with the unique index but not the constraint. Subsequent migrations will then fail to duplicate the non-existent unique constraint. Part of #273
- Loading branch information
1 parent
9586b44
commit 5686ddc
Showing
7 changed files
with
156 additions
and
45 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
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.