Skip to content

06 — Schema

Status: Current | Last reviewed: 2026-06-23

The Postgres schema, the SQL functions that operate on it, and a list of things that are stale and worth cleaning up.

The schema was squashed on 2026-06-20 into a single audited baseline with consistent naming — see Overview and Rename map.

  • Schema guide — start here: what the core columns mean and which services read/write them (the developer data dictionary).
  • Config JSONB — the field-by-field data dictionary for the agent & workflow config blobs (agent_versions.config / workflow_versions.config), generated into JSON Schema.
  • Overview — the squashed baseline, how it is applied, the drift guard.
  • Tables — the ~30 tables you will actually touch.
  • SQL functions — resolve_agent_version, publish_agent_version, friends.
  • Migration conventions — how to add a forward-only init-script.
  • Rename map — old→new column/object names from the squash + live-reader coupling.
  • Cleanup proposals — staleness audit (4 resolved by the squash).
  • Config realign backlog — config-JSONB inconsistencies: resolved by init-script 005 + what remains open.

See also