refactor: ♻️ new perm strategy in thinking process
This commit is contained in:
parent
e34adfddcf
commit
29ce92bdf7
14 changed files with 7 additions and 420 deletions
|
@ -1,3 +1,2 @@
|
||||||
-- Add down migration script here
|
-- Add down migration script here
|
||||||
DROP TABLE IF EXISTS "permission_role";
|
|
||||||
DROP TABLE IF EXISTS "role";
|
DROP TABLE IF EXISTS "role";
|
|
@ -10,61 +10,3 @@ INSERT INTO "role"(id, name) VALUES (2, 'Maintainer') ON CONFLICT(id) DO UPDATE
|
||||||
INSERT INTO "role"(id, name) VALUES (3, 'Admin') ON CONFLICT(id) DO UPDATE SET "name" = 'Admin';
|
INSERT INTO "role"(id, name) VALUES (3, 'Admin') ON CONFLICT(id) DO UPDATE SET "name" = 'Admin';
|
||||||
INSERT INTO "role"(id, name) VALUES (10, 'Normal') ON CONFLICT(id) DO UPDATE SET "name" = 'Normal';
|
INSERT INTO "role"(id, name) VALUES (10, 'Normal') ON CONFLICT(id) DO UPDATE SET "name" = 'Normal';
|
||||||
INSERT INTO "role"(id, name) VALUES (-1, 'Banned') ON CONFLICT(id) DO UPDATE SET "name" = 'Banned';
|
INSERT INTO "role"(id, name) VALUES (-1, 'Banned') ON CONFLICT(id) DO UPDATE SET "name" = 'Banned';
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS "permission_role"(
|
|
||||||
role_id BIGSERIAL PRIMARY KEY NOT NULL UNIQUE REFERENCES "role"(id),
|
|
||||||
create_self BOOLEAN NOT NULL,
|
|
||||||
read_self BOOLEAN NOT NULL,
|
|
||||||
update_self BOOLEAN NOT NULL,
|
|
||||||
delete_self BOOLEAN NOT NULL,
|
|
||||||
create_other BOOLEAN NOT NULL,
|
|
||||||
read_other BOOLEAN NOT NULL,
|
|
||||||
update_other BOOLEAN NOT NULL,
|
|
||||||
delete_other BOOLEAN NOT NULL,
|
|
||||||
create_lower BOOLEAN NOT NULL,
|
|
||||||
read_lower BOOLEAN NOT NULL,
|
|
||||||
update_lower BOOLEAN NOT NULL,
|
|
||||||
delete_lower BOOLEAN NOT NULL
|
|
||||||
);
|
|
||||||
|
|
||||||
INSERT INTO "permission_role"(role_id, create_self, read_self, update_self, delete_self, create_other, read_other, update_other, delete_other, create_lower, read_lower, update_lower, delete_lower)
|
|
||||||
VALUES (0, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE)
|
|
||||||
ON CONFLICT(role_id) DO UPDATE SET
|
|
||||||
"create_self" = TRUE, "read_self" = TRUE, "update_self" = TRUE, "delete_self" = TRUE,
|
|
||||||
"create_other" = TRUE, "read_other" = TRUE, "update_other" = TRUE, "delete_other" = TRUE,
|
|
||||||
"create_lower" = TRUE, "read_lower" = TRUE, "update_lower" = TRUE, "delete_lower" = TRUE;
|
|
||||||
|
|
||||||
INSERT INTO "permission_role"(role_id, create_self, read_self, update_self, delete_self, create_other, read_other, update_other, delete_other, create_lower, read_lower, update_lower, delete_lower)
|
|
||||||
VALUES (1, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE)
|
|
||||||
ON CONFLICT(role_id) DO UPDATE SET
|
|
||||||
"create_self" = TRUE, "read_self" = TRUE, "update_self" = TRUE, "delete_self" = TRUE,
|
|
||||||
"create_other" = TRUE, "read_other" = TRUE, "update_other" = TRUE, "delete_other" = TRUE,
|
|
||||||
"create_lower" = TRUE, "read_lower" = TRUE, "update_lower" = TRUE, "delete_lower" = TRUE;
|
|
||||||
|
|
||||||
INSERT INTO "permission_role"(role_id, create_self, read_self, update_self, delete_self, create_other, read_other, update_other, delete_other, create_lower, read_lower, update_lower, delete_lower)
|
|
||||||
VALUES (2, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE)
|
|
||||||
ON CONFLICT(role_id) DO UPDATE SET
|
|
||||||
"create_self" = TRUE, "read_self" = TRUE, "update_self" = TRUE, "delete_self" = TRUE,
|
|
||||||
"create_other" = TRUE, "read_other" = TRUE, "update_other" = TRUE, "delete_other" = TRUE,
|
|
||||||
"create_lower" = TRUE, "read_lower" = TRUE, "update_lower" = TRUE, "delete_lower" = TRUE;
|
|
||||||
|
|
||||||
INSERT INTO "permission_role"(role_id, create_self, read_self, update_self, delete_self, create_other, read_other, update_other, delete_other, create_lower, read_lower, update_lower, delete_lower)
|
|
||||||
VALUES (3, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE)
|
|
||||||
ON CONFLICT(role_id) DO UPDATE SET
|
|
||||||
"create_self" = TRUE, "read_self" = TRUE, "update_self" = TRUE, "delete_self" = TRUE,
|
|
||||||
"create_other" = TRUE, "read_other" = TRUE, "update_other" = TRUE, "delete_other" = TRUE,
|
|
||||||
"create_lower" = TRUE, "read_lower" = TRUE, "update_lower" = TRUE, "delete_lower" = TRUE;
|
|
||||||
|
|
||||||
INSERT INTO "permission_role"(role_id, create_self, read_self, update_self, delete_self, create_other, read_other, update_other, delete_other, create_lower, read_lower, update_lower, delete_lower)
|
|
||||||
VALUES (10, FALSE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE)
|
|
||||||
ON CONFLICT(role_id) DO UPDATE SET
|
|
||||||
"create_self" = FALSE, "read_self" = TRUE, "update_self" = FALSE, "delete_self" = FALSE,
|
|
||||||
"create_other" = FALSE, "read_other" = TRUE, "update_other" = FALSE, "delete_other" = FALSE,
|
|
||||||
"create_lower" = FALSE, "read_lower" = TRUE, "update_lower" = FALSE, "delete_lower" = FALSE;
|
|
||||||
|
|
||||||
INSERT INTO "permission_role"(role_id, create_self, read_self, update_self, delete_self, create_other, read_other, update_other, delete_other, create_lower, read_lower, update_lower, delete_lower)
|
|
||||||
VALUES (-1, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE)
|
|
||||||
ON CONFLICT(role_id) DO UPDATE SET
|
|
||||||
"create_self" = FALSE, "read_self" = FALSE, "update_self" = FALSE, "delete_self" = FALSE,
|
|
||||||
"create_other" = FALSE, "read_other" = FALSE, "update_other" = FALSE, "delete_other" = FALSE,
|
|
||||||
"create_lower" = FALSE, "read_lower" = FALSE, "update_lower" = FALSE, "delete_lower" = FALSE;
|
|
|
@ -1,3 +1,2 @@
|
||||||
-- Add down migration script here
|
-- Add down migration script here
|
||||||
DROP TABLE IF EXISTS "permission_user";
|
|
||||||
DROP TABLE IF EXISTS "user";
|
DROP TABLE IF EXISTS "user";
|
|
@ -9,61 +9,3 @@ CREATE TABLE IF NOT EXISTS "user"(
|
||||||
role_id BIGSERIAL NOT NULL REFERENCES "role"(id),
|
role_id BIGSERIAL NOT NULL REFERENCES "role"(id),
|
||||||
creation_time TIMESTAMPTZ NOT NULL DEFAULT NOW()
|
creation_time TIMESTAMPTZ NOT NULL DEFAULT NOW()
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS "permission_user"(
|
|
||||||
role_id BIGSERIAL PRIMARY KEY NOT NULL UNIQUE REFERENCES "role"(id),
|
|
||||||
create_self BOOLEAN NOT NULL,
|
|
||||||
read_self BOOLEAN NOT NULL,
|
|
||||||
update_self BOOLEAN NOT NULL,
|
|
||||||
delete_self BOOLEAN NOT NULL,
|
|
||||||
create_other BOOLEAN NOT NULL,
|
|
||||||
read_other BOOLEAN NOT NULL,
|
|
||||||
update_other BOOLEAN NOT NULL,
|
|
||||||
delete_other BOOLEAN NOT NULL,
|
|
||||||
create_lower BOOLEAN NOT NULL,
|
|
||||||
read_lower BOOLEAN NOT NULL,
|
|
||||||
update_lower BOOLEAN NOT NULL,
|
|
||||||
delete_lower BOOLEAN NOT NULL
|
|
||||||
);
|
|
||||||
|
|
||||||
INSERT INTO "permission_user"(role_id, create_self, read_self, update_self, delete_self, create_other, read_other, update_other, delete_other, create_lower, read_lower, update_lower, delete_lower)
|
|
||||||
VALUES (0, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE)
|
|
||||||
ON CONFLICT(role_id) DO UPDATE SET
|
|
||||||
"create_self" = TRUE, "read_self" = TRUE, "update_self" = TRUE, "delete_self" = TRUE,
|
|
||||||
"create_other" = TRUE, "read_other" = TRUE, "update_other" = TRUE, "delete_other" = TRUE,
|
|
||||||
"create_lower" = TRUE, "read_lower" = TRUE, "update_lower" = TRUE, "delete_lower" = TRUE;
|
|
||||||
|
|
||||||
INSERT INTO "permission_user"(role_id, create_self, read_self, update_self, delete_self, create_other, read_other, update_other, delete_other, create_lower, read_lower, update_lower, delete_lower)
|
|
||||||
VALUES (1, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE)
|
|
||||||
ON CONFLICT(role_id) DO UPDATE SET
|
|
||||||
"create_self" = TRUE, "read_self" = TRUE, "update_self" = TRUE, "delete_self" = TRUE,
|
|
||||||
"create_other" = TRUE, "read_other" = TRUE, "update_other" = TRUE, "delete_other" = TRUE,
|
|
||||||
"create_lower" = TRUE, "read_lower" = TRUE, "update_lower" = TRUE, "delete_lower" = TRUE;
|
|
||||||
|
|
||||||
INSERT INTO "permission_role"(role_id, create_self, read_self, update_self, delete_self, create_other, read_other, update_other, delete_other, create_lower, read_lower, update_lower, delete_lower)
|
|
||||||
VALUES (2, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE)
|
|
||||||
ON CONFLICT(role_id) DO UPDATE SET
|
|
||||||
"create_self" = TRUE, "read_self" = TRUE, "update_self" = TRUE, "delete_self" = TRUE,
|
|
||||||
"create_other" = TRUE, "read_other" = TRUE, "update_other" = TRUE, "delete_other" = TRUE,
|
|
||||||
"create_lower" = TRUE, "read_lower" = TRUE, "update_lower" = TRUE, "delete_lower" = TRUE;
|
|
||||||
|
|
||||||
INSERT INTO "permission_user"(role_id, create_self, read_self, update_self, delete_self, create_other, read_other, update_other, delete_other, create_lower, read_lower, update_lower, delete_lower)
|
|
||||||
VALUES (3, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE)
|
|
||||||
ON CONFLICT(role_id) DO UPDATE SET
|
|
||||||
"create_self" = TRUE, "read_self" = TRUE, "update_self" = TRUE, "delete_self" = TRUE,
|
|
||||||
"create_other" = TRUE, "read_other" = TRUE, "update_other" = TRUE, "delete_other" = TRUE,
|
|
||||||
"create_lower" = TRUE, "read_lower" = TRUE, "update_lower" = TRUE, "delete_lower" = TRUE;
|
|
||||||
|
|
||||||
INSERT INTO "permission_user"(role_id, create_self, read_self, update_self, delete_self, create_other, read_other, update_other, delete_other, create_lower, read_lower, update_lower, delete_lower)
|
|
||||||
VALUES (10, FALSE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE)
|
|
||||||
ON CONFLICT(role_id) DO UPDATE SET
|
|
||||||
"create_self" = FALSE, "read_self" = TRUE, "update_self" = FALSE, "delete_self" = FALSE,
|
|
||||||
"create_other" = FALSE, "read_other" = TRUE, "update_other" = FALSE, "delete_other" = FALSE,
|
|
||||||
"create_lower" = FALSE, "read_lower" = TRUE, "update_lower" = FALSE, "delete_lower" = FALSE;
|
|
||||||
|
|
||||||
INSERT INTO "permission_user"(role_id, create_self, read_self, update_self, delete_self, create_other, read_other, update_other, delete_other, create_lower, read_lower, update_lower, delete_lower)
|
|
||||||
VALUES (-1, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE)
|
|
||||||
ON CONFLICT(role_id) DO UPDATE SET
|
|
||||||
"create_self" = FALSE, "read_self" = FALSE, "update_self" = FALSE, "delete_self" = FALSE,
|
|
||||||
"create_other" = FALSE, "read_other" = FALSE, "update_other" = FALSE, "delete_other" = FALSE,
|
|
||||||
"create_lower" = FALSE, "read_lower" = FALSE, "update_lower" = FALSE, "delete_lower" = FALSE;
|
|
|
@ -1,3 +1,2 @@
|
||||||
-- Add down migration script here
|
-- Add down migration script here
|
||||||
DROP TABLE IF EXISTS "permission_post";
|
|
||||||
DROP TABLE IF EXISTS "post";
|
DROP TABLE IF EXISTS "post";
|
|
@ -4,61 +4,3 @@ CREATE TABLE IF NOT EXISTS "post"(
|
||||||
poster_id BIGSERIAL NOT NULL REFERENCES "user"(id),
|
poster_id BIGSERIAL NOT NULL REFERENCES "user"(id),
|
||||||
post VARCHAR NOT NULL UNIQUE
|
post VARCHAR NOT NULL UNIQUE
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS "permission_post"(
|
|
||||||
role_id BIGSERIAL PRIMARY KEY NOT NULL UNIQUE REFERENCES "role"(id),
|
|
||||||
create_self BOOLEAN NOT NULL,
|
|
||||||
read_self BOOLEAN NOT NULL,
|
|
||||||
update_self BOOLEAN NOT NULL,
|
|
||||||
delete_self BOOLEAN NOT NULL,
|
|
||||||
create_other BOOLEAN NOT NULL,
|
|
||||||
read_other BOOLEAN NOT NULL,
|
|
||||||
update_other BOOLEAN NOT NULL,
|
|
||||||
delete_other BOOLEAN NOT NULL,
|
|
||||||
create_lower BOOLEAN NOT NULL,
|
|
||||||
read_lower BOOLEAN NOT NULL,
|
|
||||||
update_lower BOOLEAN NOT NULL,
|
|
||||||
delete_lower BOOLEAN NOT NULL
|
|
||||||
);
|
|
||||||
|
|
||||||
INSERT INTO "permission_post"(role_id, create_self, read_self, update_self, delete_self, create_other, read_other, update_other, delete_other, create_lower, read_lower, update_lower, delete_lower)
|
|
||||||
VALUES (0, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE)
|
|
||||||
ON CONFLICT(role_id) DO UPDATE SET
|
|
||||||
"create_self" = TRUE, "read_self" = TRUE, "update_self" = TRUE, "delete_self" = TRUE,
|
|
||||||
"create_other" = TRUE, "read_other" = TRUE, "update_other" = TRUE, "delete_other" = TRUE,
|
|
||||||
"create_lower" = TRUE, "read_lower" = TRUE, "update_lower" = TRUE, "delete_lower" = TRUE;
|
|
||||||
|
|
||||||
INSERT INTO "permission_post"(role_id, create_self, read_self, update_self, delete_self, create_other, read_other, update_other, delete_other, create_lower, read_lower, update_lower, delete_lower)
|
|
||||||
VALUES (1, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE)
|
|
||||||
ON CONFLICT(role_id) DO UPDATE SET
|
|
||||||
"create_self" = TRUE, "read_self" = TRUE, "update_self" = TRUE, "delete_self" = TRUE,
|
|
||||||
"create_other" = TRUE, "read_other" = TRUE, "update_other" = TRUE, "delete_other" = TRUE,
|
|
||||||
"create_lower" = TRUE, "read_lower" = TRUE, "update_lower" = TRUE, "delete_lower" = TRUE;
|
|
||||||
|
|
||||||
INSERT INTO "permission_role"(role_id, create_self, read_self, update_self, delete_self, create_other, read_other, update_other, delete_other, create_lower, read_lower, update_lower, delete_lower)
|
|
||||||
VALUES (2, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE)
|
|
||||||
ON CONFLICT(role_id) DO UPDATE SET
|
|
||||||
"create_self" = TRUE, "read_self" = TRUE, "update_self" = TRUE, "delete_self" = TRUE,
|
|
||||||
"create_other" = TRUE, "read_other" = TRUE, "update_other" = TRUE, "delete_other" = TRUE,
|
|
||||||
"create_lower" = TRUE, "read_lower" = TRUE, "update_lower" = TRUE, "delete_lower" = TRUE;
|
|
||||||
|
|
||||||
INSERT INTO "permission_post"(role_id, create_self, read_self, update_self, delete_self, create_other, read_other, update_other, delete_other, create_lower, read_lower, update_lower, delete_lower)
|
|
||||||
VALUES (3, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE)
|
|
||||||
ON CONFLICT(role_id) DO UPDATE SET
|
|
||||||
"create_self" = TRUE, "read_self" = TRUE, "update_self" = TRUE, "delete_self" = TRUE,
|
|
||||||
"create_other" = TRUE, "read_other" = TRUE, "update_other" = TRUE, "delete_other" = TRUE,
|
|
||||||
"create_lower" = TRUE, "read_lower" = TRUE, "update_lower" = TRUE, "delete_lower" = TRUE;
|
|
||||||
|
|
||||||
INSERT INTO "permission_post"(role_id, create_self, read_self, update_self, delete_self, create_other, read_other, update_other, delete_other, create_lower, read_lower, update_lower, delete_lower)
|
|
||||||
VALUES (10, FALSE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE)
|
|
||||||
ON CONFLICT(role_id) DO UPDATE SET
|
|
||||||
"create_self" = FALSE, "read_self" = TRUE, "update_self" = FALSE, "delete_self" = FALSE,
|
|
||||||
"create_other" = FALSE, "read_other" = TRUE, "update_other" = FALSE, "delete_other" = FALSE,
|
|
||||||
"create_lower" = FALSE, "read_lower" = TRUE, "update_lower" = FALSE, "delete_lower" = FALSE;
|
|
||||||
|
|
||||||
INSERT INTO "permission_post"(role_id, create_self, read_self, update_self, delete_self, create_other, read_other, update_other, delete_other, create_lower, read_lower, update_lower, delete_lower)
|
|
||||||
VALUES (-1, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE)
|
|
||||||
ON CONFLICT(role_id) DO UPDATE SET
|
|
||||||
"create_self" = FALSE, "read_self" = FALSE, "update_self" = FALSE, "delete_self" = FALSE,
|
|
||||||
"create_other" = FALSE, "read_other" = FALSE, "update_other" = FALSE, "delete_other" = FALSE,
|
|
||||||
"create_lower" = FALSE, "read_lower" = FALSE, "update_lower" = FALSE, "delete_lower" = FALSE;
|
|
|
@ -1,3 +1,2 @@
|
||||||
-- Add down migration script here
|
-- Add down migration script here
|
||||||
DROP TABLE IF EXISTS "permission_comment";
|
|
||||||
DROP TABLE IF EXISTS "comment";
|
DROP TABLE IF EXISTS "comment";
|
|
@ -5,61 +5,3 @@ CREATE TABLE IF NOT EXISTS "comment"(
|
||||||
commenter_id BIGSERIAL NOT NULL REFERENCES "user"(id),
|
commenter_id BIGSERIAL NOT NULL REFERENCES "user"(id),
|
||||||
comment VARCHAR NOT NULL
|
comment VARCHAR NOT NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS "permission_comment"(
|
|
||||||
role_id BIGSERIAL PRIMARY KEY NOT NULL UNIQUE REFERENCES "role"(id),
|
|
||||||
create_self BOOLEAN NOT NULL,
|
|
||||||
read_self BOOLEAN NOT NULL,
|
|
||||||
update_self BOOLEAN NOT NULL,
|
|
||||||
delete_self BOOLEAN NOT NULL,
|
|
||||||
create_other BOOLEAN NOT NULL,
|
|
||||||
read_other BOOLEAN NOT NULL,
|
|
||||||
update_other BOOLEAN NOT NULL,
|
|
||||||
delete_other BOOLEAN NOT NULL,
|
|
||||||
create_lower BOOLEAN NOT NULL,
|
|
||||||
read_lower BOOLEAN NOT NULL,
|
|
||||||
update_lower BOOLEAN NOT NULL,
|
|
||||||
delete_lower BOOLEAN NOT NULL
|
|
||||||
);
|
|
||||||
|
|
||||||
INSERT INTO "permission_comment"(role_id, create_self, read_self, update_self, delete_self, create_other, read_other, update_other, delete_other, create_lower, read_lower, update_lower, delete_lower)
|
|
||||||
VALUES (0, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE)
|
|
||||||
ON CONFLICT(role_id) DO UPDATE SET
|
|
||||||
"create_self" = TRUE, "read_self" = TRUE, "update_self" = TRUE, "delete_self" = TRUE,
|
|
||||||
"create_other" = TRUE, "read_other" = TRUE, "update_other" = TRUE, "delete_other" = TRUE,
|
|
||||||
"create_lower" = TRUE, "read_lower" = TRUE, "update_lower" = TRUE, "delete_lower" = TRUE;
|
|
||||||
|
|
||||||
INSERT INTO "permission_comment"(role_id, create_self, read_self, update_self, delete_self, create_other, read_other, update_other, delete_other, create_lower, read_lower, update_lower, delete_lower)
|
|
||||||
VALUES (1, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE)
|
|
||||||
ON CONFLICT(role_id) DO UPDATE SET
|
|
||||||
"create_self" = TRUE, "read_self" = TRUE, "update_self" = TRUE, "delete_self" = TRUE,
|
|
||||||
"create_other" = TRUE, "read_other" = TRUE, "update_other" = TRUE, "delete_other" = TRUE,
|
|
||||||
"create_lower" = TRUE, "read_lower" = TRUE, "update_lower" = TRUE, "delete_lower" = TRUE;
|
|
||||||
|
|
||||||
INSERT INTO "permission_role"(role_id, create_self, read_self, update_self, delete_self, create_other, read_other, update_other, delete_other, create_lower, read_lower, update_lower, delete_lower)
|
|
||||||
VALUES (2, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE)
|
|
||||||
ON CONFLICT(role_id) DO UPDATE SET
|
|
||||||
"create_self" = TRUE, "read_self" = TRUE, "update_self" = TRUE, "delete_self" = TRUE,
|
|
||||||
"create_other" = TRUE, "read_other" = TRUE, "update_other" = TRUE, "delete_other" = TRUE,
|
|
||||||
"create_lower" = TRUE, "read_lower" = TRUE, "update_lower" = TRUE, "delete_lower" = TRUE;
|
|
||||||
|
|
||||||
INSERT INTO "permission_comment"(role_id, create_self, read_self, update_self, delete_self, create_other, read_other, update_other, delete_other, create_lower, read_lower, update_lower, delete_lower)
|
|
||||||
VALUES (3, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE)
|
|
||||||
ON CONFLICT(role_id) DO UPDATE SET
|
|
||||||
"create_self" = TRUE, "read_self" = TRUE, "update_self" = TRUE, "delete_self" = TRUE,
|
|
||||||
"create_other" = TRUE, "read_other" = TRUE, "update_other" = TRUE, "delete_other" = TRUE,
|
|
||||||
"create_lower" = TRUE, "read_lower" = TRUE, "update_lower" = TRUE, "delete_lower" = TRUE;
|
|
||||||
|
|
||||||
INSERT INTO "permission_comment"(role_id, create_self, read_self, update_self, delete_self, create_other, read_other, update_other, delete_other, create_lower, read_lower, update_lower, delete_lower)
|
|
||||||
VALUES (10, FALSE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE)
|
|
||||||
ON CONFLICT(role_id) DO UPDATE SET
|
|
||||||
"create_self" = FALSE, "read_self" = TRUE, "update_self" = FALSE, "delete_self" = FALSE,
|
|
||||||
"create_other" = FALSE, "read_other" = TRUE, "update_other" = FALSE, "delete_other" = FALSE,
|
|
||||||
"create_lower" = FALSE, "read_lower" = TRUE, "update_lower" = FALSE, "delete_lower" = FALSE;
|
|
||||||
|
|
||||||
INSERT INTO "permission_comment"(role_id, create_self, read_self, update_self, delete_self, create_other, read_other, update_other, delete_other, create_lower, read_lower, update_lower, delete_lower)
|
|
||||||
VALUES (-1, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE)
|
|
||||||
ON CONFLICT(role_id) DO UPDATE SET
|
|
||||||
"create_self" = FALSE, "read_self" = FALSE, "update_self" = FALSE, "delete_self" = FALSE,
|
|
||||||
"create_other" = FALSE, "read_other" = FALSE, "update_other" = FALSE, "delete_other" = FALSE,
|
|
||||||
"create_lower" = FALSE, "read_lower" = FALSE, "update_lower" = FALSE, "delete_lower" = FALSE;
|
|
|
@ -1,3 +1,2 @@
|
||||||
-- Add down migration script here
|
-- Add down migration script here
|
||||||
DROP TABLE IF EXISTS "permission_interaction";
|
|
||||||
DROP TABLE IF EXISTS "interaction";
|
DROP TABLE IF EXISTS "interaction";
|
|
@ -3,61 +3,3 @@ CREATE TABLE IF NOT EXISTS "interaction"(
|
||||||
id BIGSERIAL PRIMARY KEY NOT NULL UNIQUE,
|
id BIGSERIAL PRIMARY KEY NOT NULL UNIQUE,
|
||||||
name VARCHAR(10) UNIQUE NOT NULL
|
name VARCHAR(10) UNIQUE NOT NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS "permission_interaction"(
|
|
||||||
role_id BIGSERIAL PRIMARY KEY NOT NULL UNIQUE REFERENCES "role"(id),
|
|
||||||
create_self BOOLEAN NOT NULL,
|
|
||||||
read_self BOOLEAN NOT NULL,
|
|
||||||
update_self BOOLEAN NOT NULL,
|
|
||||||
delete_self BOOLEAN NOT NULL,
|
|
||||||
create_other BOOLEAN NOT NULL,
|
|
||||||
read_other BOOLEAN NOT NULL,
|
|
||||||
update_other BOOLEAN NOT NULL,
|
|
||||||
delete_other BOOLEAN NOT NULL,
|
|
||||||
create_lower BOOLEAN NOT NULL,
|
|
||||||
read_lower BOOLEAN NOT NULL,
|
|
||||||
update_lower BOOLEAN NOT NULL,
|
|
||||||
delete_lower BOOLEAN NOT NULL
|
|
||||||
);
|
|
||||||
|
|
||||||
INSERT INTO "permission_interaction"(role_id, create_self, read_self, update_self, delete_self, create_other, read_other, update_other, delete_other, create_lower, read_lower, update_lower, delete_lower)
|
|
||||||
VALUES (0, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE)
|
|
||||||
ON CONFLICT(role_id) DO UPDATE SET
|
|
||||||
"create_self" = TRUE, "read_self" = TRUE, "update_self" = TRUE, "delete_self" = TRUE,
|
|
||||||
"create_other" = TRUE, "read_other" = TRUE, "update_other" = TRUE, "delete_other" = TRUE,
|
|
||||||
"create_lower" = TRUE, "read_lower" = TRUE, "update_lower" = TRUE, "delete_lower" = TRUE;
|
|
||||||
|
|
||||||
INSERT INTO "permission_interaction"(role_id, create_self, read_self, update_self, delete_self, create_other, read_other, update_other, delete_other, create_lower, read_lower, update_lower, delete_lower)
|
|
||||||
VALUES (1, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE)
|
|
||||||
ON CONFLICT(role_id) DO UPDATE SET
|
|
||||||
"create_self" = TRUE, "read_self" = TRUE, "update_self" = TRUE, "delete_self" = TRUE,
|
|
||||||
"create_other" = TRUE, "read_other" = TRUE, "update_other" = TRUE, "delete_other" = TRUE,
|
|
||||||
"create_lower" = TRUE, "read_lower" = TRUE, "update_lower" = TRUE, "delete_lower" = TRUE;
|
|
||||||
|
|
||||||
INSERT INTO "permission_role"(role_id, create_self, read_self, update_self, delete_self, create_other, read_other, update_other, delete_other, create_lower, read_lower, update_lower, delete_lower)
|
|
||||||
VALUES (2, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE)
|
|
||||||
ON CONFLICT(role_id) DO UPDATE SET
|
|
||||||
"create_self" = TRUE, "read_self" = TRUE, "update_self" = TRUE, "delete_self" = TRUE,
|
|
||||||
"create_other" = TRUE, "read_other" = TRUE, "update_other" = TRUE, "delete_other" = TRUE,
|
|
||||||
"create_lower" = TRUE, "read_lower" = TRUE, "update_lower" = TRUE, "delete_lower" = TRUE;
|
|
||||||
|
|
||||||
INSERT INTO "permission_interaction"(role_id, create_self, read_self, update_self, delete_self, create_other, read_other, update_other, delete_other, create_lower, read_lower, update_lower, delete_lower)
|
|
||||||
VALUES (3, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE)
|
|
||||||
ON CONFLICT(role_id) DO UPDATE SET
|
|
||||||
"create_self" = TRUE, "read_self" = TRUE, "update_self" = TRUE, "delete_self" = TRUE,
|
|
||||||
"create_other" = TRUE, "read_other" = TRUE, "update_other" = TRUE, "delete_other" = TRUE,
|
|
||||||
"create_lower" = TRUE, "read_lower" = TRUE, "update_lower" = TRUE, "delete_lower" = TRUE;
|
|
||||||
|
|
||||||
INSERT INTO "permission_interaction"(role_id, create_self, read_self, update_self, delete_self, create_other, read_other, update_other, delete_other, create_lower, read_lower, update_lower, delete_lower)
|
|
||||||
VALUES (10, FALSE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE)
|
|
||||||
ON CONFLICT(role_id) DO UPDATE SET
|
|
||||||
"create_self" = FALSE, "read_self" = TRUE, "update_self" = FALSE, "delete_self" = FALSE,
|
|
||||||
"create_other" = FALSE, "read_other" = TRUE, "update_other" = FALSE, "delete_other" = FALSE,
|
|
||||||
"create_lower" = FALSE, "read_lower" = TRUE, "update_lower" = FALSE, "delete_lower" = FALSE;
|
|
||||||
|
|
||||||
INSERT INTO "permission_interaction"(role_id, create_self, read_self, update_self, delete_self, create_other, read_other, update_other, delete_other, create_lower, read_lower, update_lower, delete_lower)
|
|
||||||
VALUES (-1, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE)
|
|
||||||
ON CONFLICT(role_id) DO UPDATE SET
|
|
||||||
"create_self" = FALSE, "read_self" = FALSE, "update_self" = FALSE, "delete_self" = FALSE,
|
|
||||||
"create_other" = FALSE, "read_other" = FALSE, "update_other" = FALSE, "delete_other" = FALSE,
|
|
||||||
"create_lower" = FALSE, "read_lower" = FALSE, "update_lower" = FALSE, "delete_lower" = FALSE;
|
|
|
@ -1,3 +1,2 @@
|
||||||
-- Add down migration script here
|
-- Add down migration script here
|
||||||
DROP TABLE IF EXISTS "permission_post_interaction";
|
|
||||||
DROP TABLE IF EXISTS "post_interaction";
|
DROP TABLE IF EXISTS "post_interaction";
|
|
@ -5,61 +5,3 @@ CREATE TABLE IF NOT EXISTS "post_interaction"(
|
||||||
interactor_id BIGSERIAL NOT NULL REFERENCES "user"(id),
|
interactor_id BIGSERIAL NOT NULL REFERENCES "user"(id),
|
||||||
interaction_time TIMESTAMPTZ PRIMARY KEY NOT NULL UNIQUE DEFAULT NOW()
|
interaction_time TIMESTAMPTZ PRIMARY KEY NOT NULL UNIQUE DEFAULT NOW()
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS "permission_post_interaction"(
|
|
||||||
role_id BIGSERIAL PRIMARY KEY NOT NULL UNIQUE REFERENCES "role"(id),
|
|
||||||
create_self BOOLEAN NOT NULL,
|
|
||||||
read_self BOOLEAN NOT NULL,
|
|
||||||
update_self BOOLEAN NOT NULL,
|
|
||||||
delete_self BOOLEAN NOT NULL,
|
|
||||||
create_other BOOLEAN NOT NULL,
|
|
||||||
read_other BOOLEAN NOT NULL,
|
|
||||||
update_other BOOLEAN NOT NULL,
|
|
||||||
delete_other BOOLEAN NOT NULL,
|
|
||||||
create_lower BOOLEAN NOT NULL,
|
|
||||||
read_lower BOOLEAN NOT NULL,
|
|
||||||
update_lower BOOLEAN NOT NULL,
|
|
||||||
delete_lower BOOLEAN NOT NULL
|
|
||||||
);
|
|
||||||
|
|
||||||
INSERT INTO "permission_post_interaction"(role_id, create_self, read_self, update_self, delete_self, create_other, read_other, update_other, delete_other, create_lower, read_lower, update_lower, delete_lower)
|
|
||||||
VALUES (0, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE)
|
|
||||||
ON CONFLICT(role_id) DO UPDATE SET
|
|
||||||
"create_self" = TRUE, "read_self" = TRUE, "update_self" = TRUE, "delete_self" = TRUE,
|
|
||||||
"create_other" = TRUE, "read_other" = TRUE, "update_other" = TRUE, "delete_other" = TRUE,
|
|
||||||
"create_lower" = TRUE, "read_lower" = TRUE, "update_lower" = TRUE, "delete_lower" = TRUE;
|
|
||||||
|
|
||||||
INSERT INTO "permission_post_interaction"(role_id, create_self, read_self, update_self, delete_self, create_other, read_other, update_other, delete_other, create_lower, read_lower, update_lower, delete_lower)
|
|
||||||
VALUES (1, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE)
|
|
||||||
ON CONFLICT(role_id) DO UPDATE SET
|
|
||||||
"create_self" = TRUE, "read_self" = TRUE, "update_self" = TRUE, "delete_self" = TRUE,
|
|
||||||
"create_other" = TRUE, "read_other" = TRUE, "update_other" = TRUE, "delete_other" = TRUE,
|
|
||||||
"create_lower" = TRUE, "read_lower" = TRUE, "update_lower" = TRUE, "delete_lower" = TRUE;
|
|
||||||
|
|
||||||
INSERT INTO "permission_role"(role_id, create_self, read_self, update_self, delete_self, create_other, read_other, update_other, delete_other, create_lower, read_lower, update_lower, delete_lower)
|
|
||||||
VALUES (2, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE)
|
|
||||||
ON CONFLICT(role_id) DO UPDATE SET
|
|
||||||
"create_self" = TRUE, "read_self" = TRUE, "update_self" = TRUE, "delete_self" = TRUE,
|
|
||||||
"create_other" = TRUE, "read_other" = TRUE, "update_other" = TRUE, "delete_other" = TRUE,
|
|
||||||
"create_lower" = TRUE, "read_lower" = TRUE, "update_lower" = TRUE, "delete_lower" = TRUE;
|
|
||||||
|
|
||||||
INSERT INTO "permission_post_interaction"(role_id, create_self, read_self, update_self, delete_self, create_other, read_other, update_other, delete_other, create_lower, read_lower, update_lower, delete_lower)
|
|
||||||
VALUES (3, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE)
|
|
||||||
ON CONFLICT(role_id) DO UPDATE SET
|
|
||||||
"create_self" = TRUE, "read_self" = TRUE, "update_self" = TRUE, "delete_self" = TRUE,
|
|
||||||
"create_other" = TRUE, "read_other" = TRUE, "update_other" = TRUE, "delete_other" = TRUE,
|
|
||||||
"create_lower" = TRUE, "read_lower" = TRUE, "update_lower" = TRUE, "delete_lower" = TRUE;
|
|
||||||
|
|
||||||
INSERT INTO "permission_post_interaction"(role_id, create_self, read_self, update_self, delete_self, create_other, read_other, update_other, delete_other, create_lower, read_lower, update_lower, delete_lower)
|
|
||||||
VALUES (10, FALSE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE)
|
|
||||||
ON CONFLICT(role_id) DO UPDATE SET
|
|
||||||
"create_self" = FALSE, "read_self" = TRUE, "update_self" = FALSE, "delete_self" = FALSE,
|
|
||||||
"create_other" = FALSE, "read_other" = TRUE, "update_other" = FALSE, "delete_other" = FALSE,
|
|
||||||
"create_lower" = FALSE, "read_lower" = TRUE, "update_lower" = FALSE, "delete_lower" = FALSE;
|
|
||||||
|
|
||||||
INSERT INTO "permission_post_interaction"(role_id, create_self, read_self, update_self, delete_self, create_other, read_other, update_other, delete_other, create_lower, read_lower, update_lower, delete_lower)
|
|
||||||
VALUES (-1, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE)
|
|
||||||
ON CONFLICT(role_id) DO UPDATE SET
|
|
||||||
"create_self" = FALSE, "read_self" = FALSE, "update_self" = FALSE, "delete_self" = FALSE,
|
|
||||||
"create_other" = FALSE, "read_other" = FALSE, "update_other" = FALSE, "delete_other" = FALSE,
|
|
||||||
"create_lower" = FALSE, "read_lower" = FALSE, "update_lower" = FALSE, "delete_lower" = FALSE;
|
|
|
@ -1,3 +1,2 @@
|
||||||
-- Add down migration script here
|
-- Add down migration script here
|
||||||
DROP TABLE IF EXISTS "permission_comment_interaction";
|
|
||||||
DROP TABLE IF EXISTS "comment_interaction";
|
DROP TABLE IF EXISTS "comment_interaction";
|
|
@ -5,61 +5,3 @@ CREATE TABLE IF NOT EXISTS "comment_interaction"(
|
||||||
interactor_id BIGSERIAL NOT NULL REFERENCES "user"(id),
|
interactor_id BIGSERIAL NOT NULL REFERENCES "user"(id),
|
||||||
interaction_time TIMESTAMPTZ PRIMARY KEY NOT NULL UNIQUE DEFAULT NOW()
|
interaction_time TIMESTAMPTZ PRIMARY KEY NOT NULL UNIQUE DEFAULT NOW()
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS "permission_comment_interaction"(
|
|
||||||
role_id BIGSERIAL PRIMARY KEY NOT NULL UNIQUE REFERENCES "role"(id),
|
|
||||||
create_self BOOLEAN NOT NULL,
|
|
||||||
read_self BOOLEAN NOT NULL,
|
|
||||||
update_self BOOLEAN NOT NULL,
|
|
||||||
delete_self BOOLEAN NOT NULL,
|
|
||||||
create_other BOOLEAN NOT NULL,
|
|
||||||
read_other BOOLEAN NOT NULL,
|
|
||||||
update_other BOOLEAN NOT NULL,
|
|
||||||
delete_other BOOLEAN NOT NULL,
|
|
||||||
create_lower BOOLEAN NOT NULL,
|
|
||||||
read_lower BOOLEAN NOT NULL,
|
|
||||||
update_lower BOOLEAN NOT NULL,
|
|
||||||
delete_lower BOOLEAN NOT NULL
|
|
||||||
);
|
|
||||||
|
|
||||||
INSERT INTO "permission_comment_interaction"(role_id, create_self, read_self, update_self, delete_self, create_other, read_other, update_other, delete_other, create_lower, read_lower, update_lower, delete_lower)
|
|
||||||
VALUES (0, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE)
|
|
||||||
ON CONFLICT(role_id) DO UPDATE SET
|
|
||||||
"create_self" = TRUE, "read_self" = TRUE, "update_self" = TRUE, "delete_self" = TRUE,
|
|
||||||
"create_other" = TRUE, "read_other" = TRUE, "update_other" = TRUE, "delete_other" = TRUE,
|
|
||||||
"create_lower" = TRUE, "read_lower" = TRUE, "update_lower" = TRUE, "delete_lower" = TRUE;
|
|
||||||
|
|
||||||
INSERT INTO "permission_comment_interaction"(role_id, create_self, read_self, update_self, delete_self, create_other, read_other, update_other, delete_other, create_lower, read_lower, update_lower, delete_lower)
|
|
||||||
VALUES (1, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE)
|
|
||||||
ON CONFLICT(role_id) DO UPDATE SET
|
|
||||||
"create_self" = TRUE, "read_self" = TRUE, "update_self" = TRUE, "delete_self" = TRUE,
|
|
||||||
"create_other" = TRUE, "read_other" = TRUE, "update_other" = TRUE, "delete_other" = TRUE,
|
|
||||||
"create_lower" = TRUE, "read_lower" = TRUE, "update_lower" = TRUE, "delete_lower" = TRUE;
|
|
||||||
|
|
||||||
INSERT INTO "permission_role"(role_id, create_self, read_self, update_self, delete_self, create_other, read_other, update_other, delete_other, create_lower, read_lower, update_lower, delete_lower)
|
|
||||||
VALUES (2, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE)
|
|
||||||
ON CONFLICT(role_id) DO UPDATE SET
|
|
||||||
"create_self" = TRUE, "read_self" = TRUE, "update_self" = TRUE, "delete_self" = TRUE,
|
|
||||||
"create_other" = TRUE, "read_other" = TRUE, "update_other" = TRUE, "delete_other" = TRUE,
|
|
||||||
"create_lower" = TRUE, "read_lower" = TRUE, "update_lower" = TRUE, "delete_lower" = TRUE;
|
|
||||||
|
|
||||||
INSERT INTO "permission_comment_interaction"(role_id, create_self, read_self, update_self, delete_self, create_other, read_other, update_other, delete_other, create_lower, read_lower, update_lower, delete_lower)
|
|
||||||
VALUES (3, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE)
|
|
||||||
ON CONFLICT(role_id) DO UPDATE SET
|
|
||||||
"create_self" = TRUE, "read_self" = TRUE, "update_self" = TRUE, "delete_self" = TRUE,
|
|
||||||
"create_other" = TRUE, "read_other" = TRUE, "update_other" = TRUE, "delete_other" = TRUE,
|
|
||||||
"create_lower" = TRUE, "read_lower" = TRUE, "update_lower" = TRUE, "delete_lower" = TRUE;
|
|
||||||
|
|
||||||
INSERT INTO "permission_comment_interaction"(role_id, create_self, read_self, update_self, delete_self, create_other, read_other, update_other, delete_other, create_lower, read_lower, update_lower, delete_lower)
|
|
||||||
VALUES (10, FALSE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE)
|
|
||||||
ON CONFLICT(role_id) DO UPDATE SET
|
|
||||||
"create_self" = FALSE, "read_self" = TRUE, "update_self" = FALSE, "delete_self" = FALSE,
|
|
||||||
"create_other" = FALSE, "read_other" = TRUE, "update_other" = FALSE, "delete_other" = FALSE,
|
|
||||||
"create_lower" = FALSE, "read_lower" = TRUE, "update_lower" = FALSE, "delete_lower" = FALSE;
|
|
||||||
|
|
||||||
INSERT INTO "permission_comment_interaction"(role_id, create_self, read_self, update_self, delete_self, create_other, read_other, update_other, delete_other, create_lower, read_lower, update_lower, delete_lower)
|
|
||||||
VALUES (-1, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE)
|
|
||||||
ON CONFLICT(role_id) DO UPDATE SET
|
|
||||||
"create_self" = FALSE, "read_self" = FALSE, "update_self" = FALSE, "delete_self" = FALSE,
|
|
||||||
"create_other" = FALSE, "read_other" = FALSE, "update_other" = FALSE, "delete_other" = FALSE,
|
|
||||||
"create_lower" = FALSE, "read_lower" = FALSE, "update_lower" = FALSE, "delete_lower" = FALSE;
|
|
Loading…
Add table
Add a link
Reference in a new issue