aboutsummaryrefslogtreecommitdiff
path: root/backend/cargohold.sql
blob: 2f0a1dbc2a2677f011c598740ba79203058e6f32 (plain)
1
2
3
CREATE TABLE users (name TEXT NOT NULL UNIQUE PRIMARY KEY, storage INTEGER DEFAULT (0));
CREATE TABLE aliases (alias TEXT PRIMARY KEY UNIQUE NOT NULL, user TEXT REFERENCES users (name) ON DELETE CASCADE ON UPDATE CASCADE NOT NULL, real TEXT NOT NULL, access TEXT DEFAULT r, storage INTEGER, display TEXT);
CREATE TABLE sessions (id TEXT PRIMARY KEY UNIQUE NOT NULL, user TEXT REFERENCES users (name) ON DELETE CASCADE ON UPDATE CASCADE NOT NULL, expire INTEGER);