prisma-next migration show renders the full details of a single migration package: its planned operations with operation-class badges, a DDL preview of the changes, metadata such as the migrationHash, and a prominently highlighted warning when the migration contains destructive operations. It is a read-only inspection command and never modifies any files.
Options
string
Which migration to inspect. Accepts:
- A directory path (any string containing
/or\) — reads that directory directly. - A
migrationHashprefix (git-style matching) — scans all attested migrations and returns the one whose hash starts with the given prefix. - Omitted — defaults to the latest migration in the graph.
string
Path to
prisma-next.config.ts. Defaults to ./prisma-next.config.ts in the current working directory.boolean
Emit a machine-readable JSON envelope instead of the default TTY output.
boolean
Quiet mode — suppresses all output except errors.
boolean
Verbose output — includes additional metadata and timings.
Target resolution
migration show resolves the target argument in the following order:
- Path — if the argument contains a
/or\, it is treated as a directory path and that package is read directly. - Hash prefix — otherwise the argument is matched as a prefix against the
migrationHashfield of every attested migration. Matching follows the same git-style prefix semantics: the prefix must be long enough to be unambiguous; if more than one migration matches, the command exits with an error. - Default (no argument) — the latest migration in the graph (the migration whose end-contract hash matches no other migration’s start-contract hash) is used.