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:
| Kind | Meaning |
|---|---|
mismatch | A 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. |
hole | A version this binary carries below the database's maximum applied version that was never applied. |
unrecorded | An applied version the ledger holds no row for (a truncated or edited ledger); the next boot re-records it as assumed. |
Flags
| Flag | Meaning |
|---|---|
--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
| Code | Meaning |
|---|---|
| 0 | The ledger verifies clean. |
| 1 | The verdict carries findings, the request failed, or the token was rejected. |
| 2 | Usage 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 theOPSCHAIN_SKIP_MIGRATION_VERIFY=1emergency escape hatch.