aniwrapper/sql/file_history.sql

13 lines
360 B
MySQL
Raw Normal View History

CREATE TABLE file_history (
id integer PRIMARY KEY AUTOINCREMENT,
directory varchar(200) NOT NULL,
filename varchar(200) NOT NULL,
watch_date DATETIME NOT NULL,
CHECK (LENGTH(directory) > 0),
CHECK (LENGTH(filename) > 0),
UNIQUE (directory, filename)
);
2022-01-08 15:34:18 -08:00
CREATE UNIQUE INDEX dir_filename_idx ON file_history (directory, filename);