feat: make name + scope combi unique
This commit is contained in:
@ -17,8 +17,10 @@ CREATE TABLE roles (
|
|||||||
-- PERMISSIONS
|
-- PERMISSIONS
|
||||||
CREATE TABLE permissions (
|
CREATE TABLE permissions (
|
||||||
id UUID PRIMARY KEY DEFAULT gen_random_uuid (),
|
id UUID PRIMARY KEY DEFAULT gen_random_uuid (),
|
||||||
name TEXT NOT NULL UNIQUE,
|
name TEXT NOT NULL,
|
||||||
description TEXT
|
scope TEXT NOT NULL,
|
||||||
|
description TEXT,
|
||||||
|
UNIQUE (name, scope)
|
||||||
);
|
);
|
||||||
|
|
||||||
-- USER-GROUPS (many-to-many)
|
-- USER-GROUPS (many-to-many)
|
||||||
|
Reference in New Issue
Block a user