obs-replay-server/db/schema.sql
2023-06-14 21:25:37 +02:00

14 lines
340 B
SQL

CREATE TABLE users (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name text NOT NULL,
CONSTRAINT username_unique UNIQUE (name)
);
CREATE TABLE replays (
id INTEGER PRIMARY KEY AUTOINCREMENT,
file_path text NOT NULL,
creation_time text NOT NULL,
owner INTEGER NOT NULL,
FOREIGN KEY (owner) REFERENCES users (id)
);