Skip to content

Migrations

  • 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
StateMeaningFix
Pending migrationsDatabase is behind binaryRun oriel migrate up.
Dirty migrationA migration failed mid-applyInspect database and migration ledger before manual repair.
Store unreachableMigration cannot connectFix DSN, credentials, network, or database process.
Binary older than schemaRollback mismatchRestore 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.