Skip to content

Migrations

Use this page when readiness reports a schema mismatch or a migration command fails.

  • readyz returns ORL-5002.
  • oriel-migrate.service fails.
  • migrate status reports dirty state.
  • A new binary starts and then refuses to serve.
Terminal window
oriel --config /etc/oriel/oriel.toml migrate status

Run doctor for both dependency and schema checks:

Terminal window
oriel --config /etc/oriel/oriel.toml doctor
State Meaning Fix
Pending migrations Database is behind binary Run oriel migrate up.
Dirty migration A migration failed mid-apply Inspect database and migration ledger before manual repair.
Store unreachable Migration cannot connect Fix DSN, credentials, network, or database process.
Binary older than schema Rollback mismatch Restore matching binary or restore databases from backup.

For normal pending migrations:

Terminal window
oriel --config /etc/oriel/oriel.toml migrate up

For destructive rollback:

Terminal window
oriel --config /etc/oriel/oriel.toml migrate down --steps 1 --yes

Use destructive rollback only with an explicit backup and restore plan.

See Migrations and upgrades for the normal upgrade sequence.