CREATE TABLE work_deltas(
    id INTEGER NOT NULL PRIMARY KEY,
    change_id INTEGER NOT NULL,
    topic_id INTEGER NOT NULL,
    delta INTEGER NOT NULL, -- seconds
    FOREIGN KEY(id) REFERENCES deltas(id) ON DELETE CASCADE,
    FOREIGN KEY(change_id) REFERENCES changes(id) ON DELETE CASCADE,
    FOREIGN KEY(topic_id) REFERENCES topics(id) ON DELETE CASCADE
);
