You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
490 B
15 lines
490 B
-- Add up migration script here
|
|
CREATE TABLE perms (
|
|
id INTEGER GENERATED ALWAYS AS IDENTITY,
|
|
list_id INTEGER NOT NULL, -- the list affected by the permission
|
|
user_id INTEGER NOT NULL, -- the user affected by the permission
|
|
read BOOLEAN NOT NULL, -- can the user read the list
|
|
write BOOLEAN NOT NULL, -- can the user write to the list
|
|
CONSTRAINT fk_list
|
|
FOREIGN KEY(list_id)
|
|
REFERENCES list(id),
|
|
CONSTRAINT fk_user
|
|
FOREIGN KEY(user_id)
|
|
REFERENCES users(id)
|
|
);
|