-- Add migration script here
CREATE TABLE IF NOT EXISTS records (
    collection TEXT,
    rkey TEXT,
    record JSON NOT NULL,
    PRIMARY KEY (collection, rkey)
);

CREATE TABLE IF NOT EXISTS blobs (
    did TEXT,
    cid TEXT,
    blob bytea NOT NULL,
    PRIMARY KEY (did, cid)
);