in preparation to moving userdata into app, we switched to arbitrary groups
This commit is contained in:
@ -2,10 +2,6 @@ CREATE TABLE IF NOT EXISTS "user" (
|
||||
"id" integer NOT NULL PRIMARY KEY AUTOINCREMENT,
|
||||
"name" text NOT NULL UNIQUE,
|
||||
"pw" text,
|
||||
"is_cox" boolean NOT NULL DEFAULT FALSE,
|
||||
"is_admin" boolean NOT NULL DEFAULT FALSE,
|
||||
"is_guest" boolean NOT NULL DEFAULT TRUE,
|
||||
"is_tech" boolean NOT NULL DEFAULT FALSE,
|
||||
"deleted" boolean NOT NULL DEFAULT FALSE,
|
||||
"last_access" DATETIME,
|
||||
"dob" text,
|
||||
@ -15,6 +11,17 @@ CREATE TABLE IF NOT EXISTS "user" (
|
||||
"dirty_dozen" text
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS "role" (
|
||||
"id" integer NOT NULL PRIMARY KEY AUTOINCREMENT,
|
||||
"name" text NOT NULL UNIQUE
|
||||
);
|
||||
|
||||
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)
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS "trip_type" (
|
||||
"id" integer NOT NULL PRIMARY KEY AUTOINCREMENT,
|
||||
"name" text NOT NULL UNIQUE,
|
||||
|
Reference in New Issue
Block a user