rent
ReferenceCommand line

rent migrate apply

rent migrate apply validates rent/migrations/rent.sum, loads every SQL file in version order, skips files already recorded with the same checksum, and applies each pending file. It never recalculates a schema diff during deployment.

Apply pending migrations

rent migrate apply
Applied 20260910022456_create_users (2 statements)
Applied 20260910022512_add_posts (1 statement)

Running it again is idempotent:

Ready: No pending migrations.

Use another migration directory

rent migrate apply --directory database/migrations
Applied 20260910022456_create_users (4 statements)

Approve reviewed destructive SQL

rent migrate apply --allow-destructive
Applied 20260910022703_remove_legacy_sessions (1 statement)

Without --allow-destructive, Rent rejects files containing destructive operations such as DROP TABLE, TRUNCATE, DROP COLUMN, or DROP CONSTRAINT.

Recovery-only switches

rent migrate apply --no-transaction --no-lock

--no-transaction and --no-lock remove normal safety guarantees. Reserve them for operations that cannot run transactionally or for an externally serialized maintenance window.

On this page