2024-02-26 00:12:13 +01:00
|
|
|
CREATE TABLE IF NOT EXISTS user_roles (
|
|
|
|
user_id INTEGER NOT NULL,
|
|
|
|
project_id INTEGER NOT NULL,
|
2024-03-14 13:27:57 +01:00
|
|
|
p_role TEXT NOT NULL, -- 'project_manager' or 'member'
|
2024-02-26 00:12:13 +01:00
|
|
|
FOREIGN KEY (user_id) REFERENCES users (id)
|
|
|
|
FOREIGN KEY (project_id) REFERENCES projects (id)
|
2024-03-08 07:33:31 +01:00
|
|
|
FOREIGN KEY (p_role) REFERENCES project_role (p_role)
|
2024-03-01 07:47:06 +01:00
|
|
|
PRIMARY KEY (user_id, project_id)
|
2024-03-08 07:33:31 +01:00
|
|
|
);
|