Current section
Files
Jump to
Current section
Files
docs/guides/continuation-schema.sql
-- Historical Store SQL 1 layout. Install or enroll this table with a pinned
-- ExAgent.Migration in the host. Unified version 1 includes snapshot and run
-- headers, segments and both recovery indexes. Backfill existing run headers
-- with Store.Postgres.rebuild_run_headers(repo_config) if enrollment requires it.
-- To write segments, set segments: true in the Store descriptor.
-- Configure a bare SQL identifier via {Repo, table: "exagent_snapshots"}; manage
-- schema/search_path and connection permissions in the application's Repo.
CREATE TABLE IF NOT EXISTS "exagent_snapshots" (
key text PRIMARY KEY,
data text NOT NULL,
updated_at timestamptz NOT NULL DEFAULT now()
);
-- With this schema data holds a snapshot or a C7 JSON record.
-- Atomic command revision, record lifetime ID, execution fence and operation
-- receipts live inside the envelope and change under SELECT ... FOR UPDATE.
-- The application must stop old writers before an explicit format migration.
-- The application owns SQL permissions, backups, restoration and deployment
-- validation. See docs/guides/durability-and-approvals.md for Store semantics;
-- installing the table alone does not validate database recovery behavior.