mirror of
https://github.com/1f349/lavender.git
synced 2024-11-09 22:32:48 +00:00
28 lines
866 B
SQL
28 lines
866 B
SQL
CREATE TABLE IF NOT EXISTS users
|
|
(
|
|
subject TEXT PRIMARY KEY UNIQUE NOT NULL,
|
|
email TEXT NOT NULL,
|
|
email_verified INTEGER DEFAULT 0 NOT NULL,
|
|
roles TEXT NOT NULL,
|
|
userinfo TEXT,
|
|
access_token TEXT,
|
|
refresh_token TEXT,
|
|
expiry DATETIME,
|
|
updated_at DATETIME,
|
|
active INTEGER DEFAULT 1
|
|
);
|
|
|
|
CREATE TABLE IF NOT EXISTS client_store
|
|
(
|
|
subject TEXT PRIMARY KEY UNIQUE NOT NULL,
|
|
name TEXT NOT NULL,
|
|
secret TEXT UNIQUE NOT NULL,
|
|
domain TEXT NOT NULL,
|
|
owner TEXT NOT NULL,
|
|
perms TEXT NOT NULL,
|
|
public INTEGER,
|
|
sso INTEGER,
|
|
active INTEGER DEFAULT 1,
|
|
FOREIGN KEY (owner) REFERENCES users (subject)
|
|
);
|