-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #260 from SylteA/dev
Update migration
- Loading branch information
Showing
2 changed files
with
4 additions
and
2 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 |
---|---|---|
@@ -1,8 +1,9 @@ | ||
ALTER TABLE custom_roles DROP COLUMN user_id; | ||
|
||
BEGIN; | ||
ALTER TABLE custom_roles ADD COLUMN old_color VARCHAR NOT NULL; | ||
ALTER TABLE custom_roles ADD COLUMN old_color VARCHAR; | ||
UPDATE custom_roles SET old_color = CAST(color AS VARCHAR); | ||
ALTER TABLE custom_roles DROP COLUMN color; | ||
ALTER TABLE custom_roles RENAME COLUMN old_color TO color; | ||
ALTER TABLE custom_ROLES ALTER COLUMN color 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