mirror of
https://gitlab.com/fabinfra/fabaccess/bffh.git
synced 2024-11-23 23:27:57 +01:00
21 lines
485 B
MySQL
21 lines
485 B
MySQL
|
CREATE TABLE IF NOT EXISTS users (
|
||
|
id INTEGER PRIMARY KEY NOT NULL,
|
||
|
name TEXT NOT NULL,
|
||
|
password TEXT
|
||
|
);
|
||
|
|
||
|
CREATE TABLE IF NOT EXISTS user_kv (
|
||
|
id INTEGER PRIMARY KEY NOT NULL,
|
||
|
user INTEGER NOT NULL,
|
||
|
key TEXT NOT NULL,
|
||
|
value BLOB NOT NULL,
|
||
|
FOREIGN KEY (user) REFERENCES users(id)
|
||
|
);
|
||
|
|
||
|
CREATE TABLE IF NOT EXISTS user_roles (
|
||
|
id INTEGER PRIMARY KEY NOT NULL,
|
||
|
user INTEGER NOT NULL,
|
||
|
role TEXT NOT NULL,
|
||
|
FOREIGN KEY (user) REFERENCES users(id)
|
||
|
);
|