DROP TABLE source CASCADE;
DROP TABLE shasum CASCADE;
DROP TABLE fileinfo CASCADE;
CREATE TABLE source (
    hostname TEXT,
    name TEXT,
    uuid TEXT PRIMARY KEY
);
CREATE TABLE shasum (
    value TEXT PRIMARY KEY
);
CREATE TABLE fileinfo (
    file_path TEXT,
    file_size INT NULL,
    source_uuid TEXT REFERENCES source (uuid),
    shasum TEXT REFERENCES shasum (value) NULL,
    PRIMARY KEY (source_uuid, file_path),
    date_updated TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

