-- Stores a serialized CRDT state snapshot so startup can skip replaying
-- the full op log.  Only the single most recent snapshot row is kept.
CREATE TABLE IF NOT EXISTS crdt_snapshot (
    id          INTEGER PRIMARY KEY CHECK (id = 1),
    at_seq      INTEGER NOT NULL,
    max_rowid   INTEGER NOT NULL,
    state_json  TEXT    NOT NULL,
    created_at  TEXT    NOT NULL
);
