Skip to content

Commit 69d284d

Browse files
author
amvanbaren
committed
Add nulls not distinct to unique_user_data constraint
Add nulls not distinct to unique_user_data constraint to prevent double inserts for system accounts
1 parent c123517 commit 69d284d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
ALTER TABLE user_data DROP CONSTRAINT unique_user_data;
2+
ALTER TABLE user_data ADD CONSTRAINT unique_user_data UNIQUE NULLS NOT DISTINCT (provider, login_name);

0 commit comments

Comments
 (0)