tulip/database/init.sql

28 lines
1.0 KiB
MySQL
Raw Normal View History

2023-09-06 22:20:09 +01:00
CREATE TABLE IF NOT EXISTS users
(
subject TEXT PRIMARY KEY UNIQUE NOT NULL,
name TEXT NOT NULL,
username TEXT UNIQUE NOT NULL,
password TEXT NOT NULL,
picture TEXT DEFAULT "" NOT NULL,
website TEXT DEFAULT "" NOT NULL,
2023-09-06 22:20:09 +01:00
email TEXT NOT NULL,
email_verified INTEGER DEFAULT 0 NOT NULL,
pronouns TEXT DEFAULT "they/them" NOT NULL,
birthdate DATE,
zoneinfo TEXT DEFAULT "UTC" NOT NULL,
2023-09-06 22:20:09 +01:00
locale TEXT DEFAULT "en-US" NOT NULL,
updated_at DATETIME,
active INTEGER DEFAULT 1
);
CREATE TABLE IF NOT EXISTS client_store
(
subject TEXT PRIMARY KEY UNIQUE NOT NULL,
name TEXT UNIQUE NOT NULL,
secret TEXT UNIQUE NOT NULL,
domain TEXT NOT NULL,
sso INTEGER,
active INTEGER DEFAULT 1
);