prisma-next migration status
Show Prisma Next migration history and applied state.
prisma-next migration status displays migration history. With a database connection, it also shows applied and pending migrations.
Use it before and after migration apply, and when debugging why an environment is not at the expected contract state.
Usage
prisma-next migration statusOptions
| Option | What it does |
|---|---|
--db <url> | Connects to the database. |
--config <path> | Reads a specific prisma-next.config.ts file. |
--ref <name> | Shows status relative to a target ref. |
--graph | Shows the full migration graph with branches. |
--limit <n> | Limits displayed migrations. Defaults to 10. |
--all | Shows full history. |
--json | Prints a machine-readable result. |
Examples
prisma-next migration status
prisma-next migration status --db "$DATABASE_URL"
prisma-next migration status --db "$DATABASE_URL" --graph --all
prisma-next migration status --db "$DATABASE_URL" --ref productionReading the result
Without --db, status can report the migration packages available on disk. With --db, it can also compare those packages to what has been applied in the database.
Use prisma-next db verify after applying migrations to check the final database shape against the emitted contract.