Skip to main content
Version: v5.7.0

opschain admin database migrations status

Included from Basic tier

Reports the migration integrity verdict — a GET to /api/admin/database/migrations/status, the same verification every boot runs after migrations apply. A clean ledger prints one OK line and exits 0; any finding prints every finding plus the remedy and exits 1, so the verb slots into health checks and upgrade runbooks.

Finding kinds:

KindMeaning
mismatchA recorded version whose name (assumed backfills) or name+content hash (proven rows) differs from this binary's migration at that version — the content the database holds at that version was never this binary's.
holeA version this binary carries below the database's maximum applied version that was never applied.
unrecordedAn applied version the ledger holds no row for (a truncated or edited ledger); the next boot re-records it as assumed.

Flags​

FlagMeaning
--server <url>Server base URL (default: the active context / OPSCHAIN_SERVER).
--auth-token <token>Admin bearer token override (default: your opschain login session, then $OPSCHAIN_ADMIN_TOKEN, then the token stored by opschain admin login).

Under -o json / -o yaml the response document is printed verbatim; the exit code still reflects the verdict.

Exit codes​

CodeMeaning
0The ledger verifies clean.
1The verdict carries findings, the request failed, or the token was rejected.
2Usage error — no server or no credential resolvable.

Examples​

opschain admin database migrations status
opschain admin database migrations status -o json && echo clean

See also​

  • opschain docs cli/admin-database-migrations-list — the per-version view behind the verdict.
  • opschain docs database-maintenance — the boot-time verification and the OPSCHAIN_SKIP_MIGRATION_VERIFY=1 emergency escape hatch.