Migrations
Symptoms
Section titled “Symptoms”readyzreturnsORL-5002.oriel-migrate.servicefails.migrate statusreports dirty state.- A new binary starts and then refuses to serve.
Checks
Section titled “Checks”oriel --config /etc/oriel/oriel.toml migrate statusRun doctor for both dependency and schema checks:
oriel --config /etc/oriel/oriel.toml doctorCommon States
Section titled “Common States”| 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. |
Recovery
Section titled “Recovery”For normal pending migrations:
oriel --config /etc/oriel/oriel.toml migrate upFor destructive rollback:
oriel --config /etc/oriel/oriel.toml migrate down --steps 1 --yesUse destructive rollback only with an explicit backup and restore plan.