rent
ReferenceCommand line

rent migrate drift

Run drift detection after applying migrations and periodically in production:

Compare schema and database

rent migrate drift
Verified: No schema drift.

If someone changed the database outside the migration workflow:

Schema drift detected

1. add column public.posts.summary (text)
2. create index posts_author_id_idx on public.posts

Use rent migrate diff to inspect the exact repair operations.

Gate a deployment

Pass --check in CI or a deployment pipeline. Rent exits unsuccessfully when the live database differs from the RSL schema:

rent migrate drift --check
Schema drift detected

1. add column public.posts.summary (text)
2. create index posts_author_id_idx on public.posts
Error: database schema drift detected

Use JSON when a deployment system needs the complete structured operation list. --check still sets the exit status; the JSON is printed either way:

rent migrate drift --check --format json
{
  "drift": false,
  "operations": []
}

On this page