diff --git a/crates/kitsune-db/migrations/2023-12-16-192941_initial/up.sql b/crates/kitsune-db/migrations/2023-12-16-192941_initial/up.sql index e2f19466a..77bc638fd 100644 --- a/crates/kitsune-db/migrations/2023-12-16-192941_initial/up.sql +++ b/crates/kitsune-db/migrations/2023-12-16-192941_initial/up.sql @@ -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