2024-09-09 21:23:37 +02:00
|
|
|
CREATE TABLE IF NOT EXISTS content (
|
|
|
|
vanity TEXT PRIMARY KEY,
|
|
|
|
type TEXT NOT NULL,
|
|
|
|
data TEXT NOT NULL,
|
2024-09-10 19:41:49 +02:00
|
|
|
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
|
|
user_id INTEGER,
|
|
|
|
FOREIGN KEY (user_id) REFERENCES users (id)
|
2024-09-09 22:08:21 +02:00
|
|
|
);
|
|
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS users (
|
|
|
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
|
|
username TEXT UNIQUE NOT NULL,
|
2024-09-10 19:41:49 +02:00
|
|
|
password_hash TEXT NOT NULL,
|
|
|
|
api_key TEXT
|
2024-09-09 21:23:37 +02:00
|
|
|
);
|