-- scopes: create tables (and other table-related stuff)

CREATE TABLE messages (
    trackid bigserial NOT NULL primary key,
    domain text,
    action text,
    class text,
    item text,
    timestamp timestamptz default current_timestamp,
    data jsonb
);

CREATE INDEX idx_msg ON messages USING btree (domain, action, class, item);
CREATE INDEX idx_msg_item ON messages USING btree (domain, class, item);

