Migrate · 01 — The system
Ship schema changes like you ship code — planned, reviewed, reversible.
Zanith reads your declared schema, diffs it against the live database, and turns the gap into a plan where every op is risk-classified into six levels and gated against a budget you set in CI. It verifies on a shadow database before up touches production, audits every step, and leaves a restorable artifact behind every destructive op.
02 — What the others ship
The dimensions that matter at 3am.
The four migration tools a production team is most likely to evaluate, against the questions you ask the moment a deploy goes sideways. Names and versions checked April 2026.
| Capability | Prisma Migrate | Drizzle Kit | Atlas (Ariga) | Sequelize CLI | Zanith |
|---|---|---|---|---|---|
Drift detection spot live-DB drift before plan | partial | no | yes | no | yes |
Auto-fill from drift generate ops without writing SQL | yes | yes | yes | no | yes |
Risk score per op numeric 0–100, gateable in CI | no | no | no | no | yes |
Shadow-DB verify apply on a parallel DB before prod | yes | no | yes | no | yes |
Soft-drop / archive recovery destructive ops are restorable | no | no | no | no | yes |
Per-step audit row every op tracked in DB tables | partial | partial | yes | partial | yes |
Bundled web UI browse rows + apply migrations | partial | no | no | no | yes |
Down-migrations by N step back without manual SQL | yes | partial | yes | yes | yes |
| Lifecycle stage | Sequelize CLI | Drizzle Kit | Prisma Migrate | Atlas | Zanith |
|---|---|---|---|---|---|
| graph | no | yes | yes | yes | yes |
| diff | no | yes | yes | yes | yes |
| plan | no | no | no | partial | yes |
| verify | no | no | yes | yes | yes |
| apply | yes | yes | yes | yes | yes |
| recover | no | no | no | no | yes |
Partialmeans the capability exists in some form but lacks the gate or integration. Atlas comes closest — it has shadow-DB and structured audit — but it doesn't score risk per op or ship a recovery layer for destructive ops. The one row no one else fills: restorable destructive ops.
One frame. Five stages.
This is what the engine prints — not a mock dashboard. Risk-scored plan output, shadow verify verdicts, per-step apply ledger, recovery artifact codes, and verbose history from the audit tables.
proof-sourced · migrateProofSnippets
04 — Bundled flow
CLI or Studio tab. Same runner, same audit rows.
Apply from CI or click Apply in Studio — one migration runner, one risk classifier, one set of five audit tables. Recovery artifacts and shadow verify tokens are shared; nothing forks into a second process.
Four commands. One straight line.
- graphthe runtime AST
- diffstructural delta
- planrisk-scored ops
- verifyshadow-DB apply
Six named levels. One numeric budget.
Additive, reversible, no data at stake.
Cheap to apply, easy to reverse.
Can fail on real data, or breaks readers.
Likely to fail or rewrite the table.
Permanently deletes data without a flag.
Reserved ceiling for row-count-aware refusals.
A drop is not a delete. Yet.
soft_drop_columnRenames the column to _zanith_dropped_<col>_<id>. Restore = rename back. Instant.soft_drop_tableRenames the table aside. Restore = rename back. Instant, zero copy.archive_columnCopies the table into _zanith_shadow, then drops the column. Stores row count + checksum.archive_tableMoves the whole table into _zanith_shadow and renames it. Instant — no row copy.rebuild_tableAfter a copy-swap rebuild, keeps the old table as _zanith_dropped_<table>_<id>.7 recover verbs plus cleanup — no new mental model, no backup-restore dance.
Artifact table, checksums, all 7 verbs →Pick the surface that you actually need.
Each sub-page goes deeper than the hub can. The lifecycle in full, the risk classifier, the shadow gate, the recovery surface, the audit tables — plus the same flow with a UI in Studio.
Lifecycle, in depth
Generate, plan, verify, apply, audit — every flag, every output, every artifact path.
/migrate/lifecycleRisk model
6 levels, 21 reason codes, 7 gates, 31 op kinds. The full classifier.
/migrate/riskShadow-DB verify
The 4 internal stages of verifyOnShadow, deployment topologies, 4 verdicts.
/migrate/verifyRecovery
5 artifact kinds, the bookkeeping table, the 7-verb recover CLI.
/migrate/recoverAudit + history
5 Postgres tables track every migration, step, snapshot, and artifact.
/migrate/auditelsewhere