CREATE TABLE publications (
    id SERIAL,
    account_id INTEGER NOT NULL,
    event_stream_id INTEGER NOT NULL,

    PRIMARY KEY (id),
    CONSTRAINT publications_account_id_fkey FOREIGN KEY (account_id) REFERENCES accounts (id)
        ON UPDATE CASCADE,
    CONSTRAINT publications_event_stream_id_fkey FOREIGN KEY (event_stream_id) REFERENCES event_streams (id)
        ON UPDATE CASCADE
);
