Skip to content

Commit

Permalink
add unique constraint
Browse files Browse the repository at this point in the history
  • Loading branch information
aumetra committed Jun 19, 2024
1 parent 014ac58 commit 9f641df
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions crates/kitsune-db/migrations/2023-12-16-192941_initial/up.sql
Original file line number Diff line number Diff line change
Expand Up @@ -636,6 +636,14 @@ CREATE TABLE roles
updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
);

-- UNIQUE constraints

ALTER TABLE roles
ADD CONSTRAINT "uk-roles-name"
UNIQUE (name);

-- Register triggers

SELECT diesel_manage_updated_at('roles');

-- END "roles" TABLE
Expand Down

0 comments on commit 9f641df

Please sign in to comment.