-
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.
schemachanger: Enable adding/dropping path of check constraints
We enable the adding/dropping path of check constraints in declarative schema changer (previously it changes between PUBLIC and ABSENT status with a NotImplemented operation). Namely, we introduced a new element status `validating` and reused `validated` such that the status transitions of a check constraint element is ABSENT <==> WRITE_ONLY <==> VALIDATED <==> PUBLIC and it's subject to the 2-version invariant. Correspondingly, we emit operations for each transition as follows: Adding path: - ABSENT ==> WRITE_ONLY: Add a check constraint (ADD direction) to the mutation slice (Mutation Type op) - WRITE_ONLY ==> VALIDATED: validate a check constraint (Validation Type op) - VALIDATED ==> PUBLIC: complete the check constraint adding mutation (Mutation Type op) Dropping path: - PUBLIC ==> VALIDATED: Add a check constraint (DROP direction) to the mutation slice (Mutation Type op) - VALIDATED ==> WRITE_ONLY: equivalent status - (*) WRITE_ONLY ==> ABSENT: complete the check constraint dropping mutation (Mutation Type op) A check constraint in - WRITE_ONLY means it will be enforced for all new UPDATE/INSERT. - VALIDATED means validation has succeeded but it's not yet public. N.B.: * means it's information publishing/destroying stage and hence should be non-revertible.
- Loading branch information
Showing
18 changed files
with
644 additions
and
248 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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.