Module project, commit, submission
All checks were successful
Build and Release / release (push) Successful in 1m15s

This commit is contained in:
2026-04-26 16:31:03 +07:00
parent ac90236022
commit 6918a100fc
60 changed files with 5957 additions and 1020 deletions

View File

@@ -0,0 +1,14 @@
CREATE TABLE IF NOT EXISTS project_members (
project_id UUID NOT NULL REFERENCES projects(id) ON DELETE CASCADE,
user_id UUID NOT NULL REFERENCES users(id) ON DELETE CASCADE,
role SMALLINT NOT NULL DEFAULT 3, -- 1=owner, 2=editor, 3=viewer
invited_by UUID REFERENCES users(id) ON DELETE SET NULL,
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
PRIMARY KEY (project_id, user_id)
);
CREATE INDEX idx_project_members_user
ON project_members (user_id, role);
CREATE INDEX idx_project_members_project
ON project_members (project_id, role);