-
Notifications
You must be signed in to change notification settings - Fork 215
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix migration issues and increase test coverage
Signed-off-by: Nicko Guyer <[email protected]>
- Loading branch information
Showing
8 changed files
with
281 additions
and
149 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,3 @@ | ||
BEGIN; | ||
ALTER TABLE messages ALTER COLUMN tx_parent_type DROP 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
BEGIN; | ||
UPDATE messages SET tx_parent_type = '' | ||
WHERE tx_parent_type IS NULL; | ||
ALTER TABLE messages ALTER COLUMN tx_parent_type 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
ALTER TABLE messages RENAME COLUMN tx_parent_type TO tx_parent_type_temp; | ||
ALTER TABLE messages ADD COLUMN tx_parent_type VARCHAR(64); | ||
UPDATE messages SET tx_parent_type = tx_parent_type_temp; | ||
ALTER TABLE messages DROP COLUMN tx_parent_type_temp; |
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,5 @@ | ||
UPDATE messages SET tx_parent_type = '' WHERE tx_parent_type IS NULL; | ||
ALTER TABLE messages RENAME COLUMN tx_parent_type TO tx_parent_type_temp; | ||
ALTER TABLE messages ADD COLUMN tx_parent_type VARCHAR(64) NOT NULL; | ||
UPDATE messages SET tx_parent_type = tx_parent_type_temp; | ||
ALTER TABLE messages DROP COLUMN tx_parent_type_temp; |
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.