2024-02-07 01:18:17 +00:00
|
|
|
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,
|
2024-02-22 12:41:21 +00:00
|
|
|
userinfo TEXT,
|
2024-02-10 11:59:45 +00:00
|
|
|
access_token TEXT,
|
|
|
|
refresh_token TEXT,
|
|
|
|
expiry DATETIME,
|
2024-02-07 01:18:17 +00:00
|
|
|
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,
|
2024-02-10 16:23:50 +00:00
|
|
|
perms TEXT NOT NULL,
|
2024-02-08 01:16:14 +00:00
|
|
|
public INTEGER,
|
2024-02-07 01:18:17 +00:00
|
|
|
sso INTEGER,
|
|
|
|
active INTEGER DEFAULT 1,
|
|
|
|
FOREIGN KEY (owner) REFERENCES users (subject)
|
|
|
|
);
|