-
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
7ed95de
commit c1b7e8b
Showing
2 changed files
with
9 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,9 @@ | ||
-- Add migration script here | ||
-- 1. Drop the primary key on id and remove the id column | ||
ALTER TABLE old_names | ||
DROP CONSTRAINT old_names_pkey, -- Drop the current primary key on id | ||
DROP COLUMN id; | ||
|
||
-- Remove the id column | ||
-- 2. Add a new primary key on old_username | ||
ALTER TABLE old_names ADD CONSTRAINT old_names_pkey PRIMARY KEY (old_username); |
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