mirror of
https://github.com/1f349/lavender.git
synced 2024-11-09 22:32:48 +00:00
28 lines
1.0 KiB
SQL
28 lines
1.0 KiB
SQL
CREATE TABLE users
|
|
(
|
|
subject TEXT PRIMARY KEY UNIQUE NOT NULL,
|
|
email TEXT UNIQUE NOT NULL,
|
|
email_verified BOOLEAN DEFAULT 0 NOT NULL,
|
|
roles TEXT NOT NULL,
|
|
userinfo TEXT NOT NULL,
|
|
access_token TEXT NOT NULL,
|
|
refresh_token TEXT NOT NULL,
|
|
expiry DATETIME NOT NULL,
|
|
updated_at DATETIME NOT NULL,
|
|
active BOOLEAN DEFAULT 1 NOT NULL
|
|
);
|
|
|
|
CREATE TABLE 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 BOOLEAN NOT NULL,
|
|
sso BOOLEAN NOT NULL,
|
|
active BOOLEAN DEFAULT 1 NOT NULL,
|
|
FOREIGN KEY (owner) REFERENCES users (subject)
|
|
);
|