Skip to content

Commit

Permalink
feat(grant): add unique index for active grants
Browse files Browse the repository at this point in the history
  • Loading branch information
rahmatrhd committed Oct 5, 2023
1 parent 31928c0 commit 6330380
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DROP INDEX IF EXISTS "unique_active_grants_index";
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
CREATE UNIQUE INDEX IF NOT EXISTS "unique_active_grants_index" ON "grants" ("account_id", "account_type", "permissions")
WHERE
"status" = 'active';

0 comments on commit 6330380

Please sign in to comment.