Skip to content

Commit

Permalink
REDO: Modify UNIQUE constraint on xids table (#970)
Browse files Browse the repository at this point in the history
* Modify UNIQUE constraint on xids table

* Moved schema change into migration file.

* Add `IF EXISTS` to fix constraint migration

Co-authored-by: josh <joshsmith2@gmail.com>
Co-authored-by: Christopher Small <metasoarous@gmail.com>
  • Loading branch information
3 people authored Aug 24, 2022
1 parent a0c2df1 commit 3466cf2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions server/postgres/migrations/000002_add_xid_constraint.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ALTER TABLE xids
DROP CONSTRAINT IF EXISTS xids_owner_uid_key,
ADD CONSTRAINT xids_owner_xid_key UNIQUE (owner, xid);

0 comments on commit 3466cf2

Please sign in to comment.