CREATE TABLE files (
    id INTEGER PRIMARY KEY AUTOINCREMENT,
    hash VARCHAR NOT NULL,
    path VARCHAR NOT NULL,
    size BIGINT NOT NULL,
    valid BOOLEAN NOT NULL DEFAULT TRUE
);

CREATE INDEX files_hash ON files(hash);