Skip to content
ReferenceCommand line

rent migrate resolve

rent migrate resolve changes the migration history without touching your tables. Use it when the database already holds a migration's effects, or when a migration failed partway and you undid it by hand.

Record a baseline as applied

rent migrate resolve --applied 20260910000000
Resolved: Migration 20260910000000_baseline is recorded as applied.

This is how a database that predates its migrations adopts them: see Migrations. Rent refuses a version that is not in the migration directory or is already applied.

Record a failed migration as rolled back

rent migrate resolve --rolled-back 20260911093000
Resolved: Migration 20260911093000 is rolled back and runs again on the next apply.

A migration that failed partway can also be recorded as applied, once you have confirmed the database holds all of its effects.

Only a migration that failed partway can be rolled back. Undo its partial effects first, correct the file, run rent migrate seal, then apply again.