-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6ef98cb
commit f138c1f
Showing
2 changed files
with
15 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
BEGIN; | ||
|
||
-- Re-add the CHECK constraint | ||
ALTER TABLE awards_general ADD CONSTRAINT awards_general_post_id_comment_id_check CHECK ( | ||
(post_id IS NOT NULL AND comment_id IS NULL) OR | ||
(post_id IS NULL AND comment_id IS NOT NULL) | ||
); | ||
|
||
END; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
BEGIN; | ||
|
||
-- Remove the CHECK constraint | ||
ALTER TABLE awards_general DROP CONSTRAINT IF EXISTS awards_general_post_id_comment_id_check; | ||
|
||
END; |