_zanith_migrationsappliedAnswers which migrations have run, when.
migrate / audit · 01 — Four tables
Migration audit lives in four real Postgres tables, each with a clear shape and a clear question. Wire monitoring against them, replay history, build post-mortems. No log scraper required.
_zanith_migrationsappliedAnswers which migrations have run, when.
_zanith_migration_stepsper-step auditAnswers every op's status, risk, error, SQL.
_zanith_schema_snapshotsbefore/afterAnswers the runtime graph at each side of the apply.
_zanith_migration_artifactsrecoveryAnswers which destructive ops are still reversible.
02 — Four shapes
Narrow tables for the high-volume rows, wide tables for the ones that capture detail. All four created idempotently when the runner first connects.
_zanith_migrationsapplied setWhich migrations have run, in what order.
_zanith_migration_stepsper-step auditEvery op's status, risk, error, and SQL.
_zanith_schema_snapshotsbefore / afterThe schema graph at each side of the apply.
_zanith_migration_artifactsrecoveryWhich destructive ops are still reversible.
03 — History + replay
History is a join across the four tables. Every applied migration leaves a row, a per-step audit, and two snapshots (before + after). Reconstruct the schema from any point in time without restoring a backup.
14 models · 86 fields
captured 2026-05-01T11:30:21Z
14 models · 87 fields
captured 2026-05-01T11:30:23Z
Snapshots are stored as JSON in _zanith_schema_snapshots. Diff any two to see exactly what changed between releases.
04 — Questions answered
Each one is a one-page Grafana panel, a Slack alert, or a monthly engineering review row away. The data lives in the same Postgres your app uses — no log scraper, no sidecar.
20 most recent migrations as a clean list with their risk pills.
Average step duration, grouped by op kind. addIndex on big tables dominates.
Failed steps in the last 7 days, with the error captured at fail time.
Per-migration risk profile — worst score and total score, ranked.
Live artifacts by age and size — what to purge, what to restore.
Diff two schema snapshots. See exactly which models or fields moved.
The main page — system overview, contrast table, lifecycle in summary.
/migrateEvery stage of a migration, with the failure paths drawn in.
/migrate/lifecycleSix levels, twenty reason codes, three CI gates.
/migrate/riskInternal stages, deployment patterns, output modes.
/migrate/verifyFive artifact kinds, the bookkeeping table, the seven-command CLI.
/migrate/recoverApply, restore, browse audit rows from a UI.
/studio