-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Showing
9 changed files
with
17 additions
and
1 deletion.
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
persistence/sql/migrations/20230908104443000000_change_client_pk.down.sql
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,3 +1,7 @@ | ||
UPDATE hydra_client SET pk = gen_random_uuid() WHERE pk IS NULL; | ||
|
||
ALTER TABLE hydra_client ALTER COLUMN pk SET NOT NULL; | ||
|
||
ALTER TABLE hydra_client DROP CONSTRAINT hydra_client_pkey; | ||
|
||
ALTER TABLE hydra_client ADD PRIMARY KEY (pk); |
2 changes: 2 additions & 0 deletions
2
persistence/sql/migrations/20230908104443000000_change_client_pk.mysql.down.sql
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 +1,3 @@ | ||
ALTER TABLE hydra_client MODIFY pk CHAR(36) NOT NULL; | ||
|
||
ALTER TABLE hydra_client DROP PRIMARY KEY, ADD PRIMARY KEY (pk); |
2 changes: 2 additions & 0 deletions
2
persistence/sql/migrations/20230908104443000000_change_client_pk.mysql.up.sql
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 +1,3 @@ | ||
ALTER TABLE hydra_client DROP PRIMARY KEY, ADD PRIMARY KEY (id, nid); | ||
|
||
ALTER TABLE hydra_client MODIFY pk CHAR(36); |
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
2 changes: 2 additions & 0 deletions
2
persistence/sql/migrations/20230908104443000000_change_client_pk.up.sql
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,3 +1,5 @@ | ||
ALTER TABLE hydra_client DROP CONSTRAINT hydra_client_pkey; | ||
|
||
ALTER TABLE hydra_client ALTER COLUMN pk DROP NOT NULL; | ||
|
||
ALTER TABLE hydra_client ADD PRIMARY KEY (id, nid); |
3 changes: 3 additions & 0 deletions
3
persistence/sql/migrations/20230908104443000001_change_client_pk.cockroach.down.sql
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 @@ | ||
UPDATE hydra_client SET pk = gen_random_uuid() WHERE pk IS NULL; | ||
|
||
ALTER TABLE hydra_client ALTER COLUMN pk SET NOT NULL; |
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/20230908104443000001_change_client_pk.cockroach.up.sql
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 @@ | ||
ALTER TABLE hydra_client ALTER COLUMN pk DROP NOT NULL; |
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/20230908104443000001_change_client_pk.down.sql
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 @@ | ||
-- only for crdb |
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/20230908104443000001_change_client_pk.up.sql
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 @@ | ||
-- only for crdb |