Files
huskies/server/migrations/20260629000000_crdt_snapshot.sql
T
2026-06-29 20:11:52 +01:00

10 lines
377 B
SQL

-- 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
);