Skip to main content
repost schema migrate dev diffs your schema against the last migration. When something changed, it writes a timestamped snapshot under repost/migrations/, bumps the version of each affected event type, and regenerates every client. When nothing changed, the migrations tree is untouched and clients still regenerate, matching Prisma’s behavior.

Usage

Options

What it does

  1. Validates the schema and resolves every generator’s output. Failures abort with nothing written.
  2. Diffs against the previous migration, or against both heads when the history has a fork; migrate dev is the one command that reconciles a fork.
  3. If event types would be removed, lists them and asks Remove these event types? [y/N]:. In a non-interactive shell it errors instead unless --accept-removals is passed, so a removal never ships unnoticed.
  4. Resolves the name: --name, or a prompt on a terminal. Without a terminal and without --name, it errors and writes nothing.
  5. Writes the migration directory and regenerates all clients.
Exit code 1 on an invalid schema, a tampered snapshot, an unconfirmed removal, or a missing name in CI.

Examples

A run with no schema changes:
Reconciling after merging two branches that each wrote a migration:

Continue

migrate status

Verify the recorded history stays clean.

migrate deploy

Put the recorded migrations live.

Migrations & deploys

Forks, checksums, and the versioning model.