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#
repost schema migrate dev [options]Options#
| Option | Description |
|---|---|
--name <name> | Name for the migration directory, slugged into <timestamp>_<name>. Prompted on a terminal when omitted; required in CI. |
--accept-removals | Proceed without prompting when the migration removes event types. |
--schema <path> | A .repost file or a directory of them. Defaults to ./repost/schema.repost, else ./repost/schema/. |
What it does#
- Validates the schema and resolves every generator's output. Failures abort with nothing written.
- Diffs against the previous migration, or against both heads when the history has a fork;
migrate devis the one command that reconciles a fork. - 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-removalsis passed, so a removal never ships unnoticed. - Resolves the name:
--name, or a prompt on a terminal. Without a terminal and without--name, it errors and writes nothing. - 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#
repost schema migrate dev --name add_subtitleCreated migration `20260718090000_add_subtitle`:
modified book.created (version 1 → 2)A run with no schema changes:
No changes detected — the schema matches the latest migration.Reconciling after merging two branches that each wrote a migration:
Reconciled a fork of 2 migrations into `20260718091500_reconcile`:
vs 20260716120000_branch_a:
added invoice.paid (version 1)
vs 20260717090000_branch_b:
added book.created (version 1)