-
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.
sp_group_users add uniq on (user_id, group_id)
- Loading branch information
Showing
2 changed files
with
4 additions
and
0 deletions.
There are no files selected for viewing
2 changes: 2 additions & 0 deletions
2
api/db/migrations/029_add_constraint_group_users_user_id_group_id_uniq.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,2 @@ | ||
ALTER TABLE sp_group_users | ||
DROP CONSTRAINT sp_group_users_group_id_user_id_uniq; |
2 changes: 2 additions & 0 deletions
2
api/db/migrations/029_add_constraint_group_users_user_id_group_id_uniq.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,2 @@ | ||
ALTER TABLE sp_group_users | ||
ADD CONSTRAINT sp_group_users_group_id_user_id_uniq UNIQUE(sp_group_id, sp_user_id); |