This repository has been archived by the owner on Mar 19, 2019. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: replace display_template with link_phrase and reverse_link_phrase
- Loading branch information
1 parent
9d722ae
commit 8e69005
Showing
3 changed files
with
18 additions
and
1 deletion.
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,6 @@ | ||
BEGIN; | ||
|
||
ALTER TABLE bookbrainz.relationship_type RENAME COLUMN link_phrase TO display_template; | ||
ALTER TABLE bookbrainz.relationship_type DROP COLUMN reverse_link_phrase; | ||
|
||
COMMIT; |
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,10 @@ | ||
BEGIN; | ||
|
||
ALTER TABLE bookbrainz.relationship_type RENAME COLUMN display_template TO link_phrase; | ||
ALTER TABLE bookbrainz.relationship_type ADD COLUMN reverse_link_phrase TEXT CHECK (reverse_link_phrase <> ''); | ||
|
||
UPDATE bookbrainz.relationship_type SET reverse_link_phrase=' '; | ||
|
||
ALTER TABLE bookbrainz.relationship_type ALTER COLUMN reverse_link_phrase SET NOT NULL; | ||
|
||
COMMIT; |
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