rent migrate dev
rent migrate dev is the shortest feedback loop while you are editing an RSL schema. It records what your migration files do not yet do as a checksummed migration, applies every pending migration, then inspects the database and requires an empty diff.
Apply a schema edit
rent migrate dev --name add_post_summaryMigration: add_post_summary
Created ./rent/migrations/20260910022456_add_post_summary.sql (1 change)
Applied 20260910022456_add_post_summary (1 statement)
Verified: Database matches the RSL schema.Use this after adding a field, table, relationship, index, or constraint during local development. Commit both the RSL schema edit and the generated SQL migration.
Client generation is separate: run rent generate after editing the RSL schema, including permission
rules. A permission expression over existing storage can change the generated client while leaving
the database catalog unchanged. migrate dev then reports that the database already matches.
Run it again
rent migrate dev --name add_post_summaryReady: Database already matches the RSL schema.The second run is deliberately a no-op. That fixed-point check catches migrations that applied successfully but did not create the requested catalog state.
Approve a destructive local change
rent migrate dev --name replace_legacy_slug --allow-destructiveWithout --allow-destructive, Rent stops before writing or applying a migration that drops or destructively changes an object. Review rent migrate preflight first.
When the database has drifted
dev first checks that your development database is what its applied migrations built. A table created by hand, a
migration applied from another branch, or an applied migration since changed or deleted is drift:
Drift detected: Your development database is not in sync with your migrations:
- the database has a change no migration made: create table public.scratch
We need to reset the development database. All data in it will be lost. Continue? [y/N]Answer y to rebuild the database from your migrations and carry on. Without a terminal to ask, as in CI, dev stops
and asks you to run rent migrate reset --yes first. To keep a database that
predates its migrations, baseline it instead. See Migrations.
Use dev for local iteration. Use plan, review the SQL, and then use apply for controlled deployment workflows.
