You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
record_watch/migrations/00001_create_watched_table.sql

14 lines
306 B
SQL

CREATE TABLE profile (
id INTEGER PRIMARY KEY,
name TEXT NOT NULL,
UNIQUE(name)
);
CREATE TABLE watched (
id INTEGER PRIMARY KEY,
profile INTEGER NOT NULL,
path TEXT NOT NULL,
watched_at DATE NOT NULL,
FOREIGN KEY(profile) REFERENCES profile(id)
);