CREATE TABLE IF NOT EXISTS file (
    hash BYTEA PRIMARY KEY,
    mime TEXT
);

CREATE TABLE IF NOT EXISTS file_key (
    id UUID PRIMARY KEY,
    file_hash BYTEA REFERENCES file (hash) NOT NULL,
    expires_at TIMESTAMP
);
