in preparation to moving userdata into app, we switched to arbitrary groups
This commit is contained in:
@ -0,0 +1,14 @@
|
||||
CREATE TABLE IF NOT EXISTS "role" (
|
||||
"id" integer NOT NULL PRIMARY KEY AUTOINCREMENT,
|
||||
"name" text NOT NULL UNIQUE
|
||||
);
|
||||
INSERT INTO "role" (name) VALUES ('admin');
|
||||
INSERT INTO "role" (name) VALUES ('cox');
|
||||
INSERT INTO "role" (name) VALUES ('scheckbuch');
|
||||
INSERT INTO "role" (name) VALUES ('tech');
|
||||
|
||||
CREATE TABLE IF NOT EXISTS "user_role" (
|
||||
"user_id" INTEGER NOT NULL REFERENCES user(id),
|
||||
"role_id" INTEGER NOT NULL REFERENCES role(id),
|
||||
CONSTRAINT unq UNIQUE (user_id, role_id)
|
||||
);
|
||||
|
Reference in New Issue
Block a user