Skip to content

Commit

Permalink
Add migration to make openid_sub unique
Browse files Browse the repository at this point in the history
  • Loading branch information
moubctez committed Nov 12, 2024
1 parent 3cbf7ff commit d4a7a90
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions migrations/20241112105513_openid_sub_unique.down.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE "user" DROP CONSTRAINT "user_openid_sub_key";
3 changes: 3 additions & 0 deletions migrations/20241112105513_openid_sub_unique.up.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
-- Make openid_sub unique.
-- This migration may fail if duplicate openid_subs exist in the database.
ALTER TABLE "user" ADD CONSTRAINT "user_openid_sub_key" UNIQUE (openid_sub);

0 comments on commit d4a7a90

Please sign in to comment.