Documentation Index
Fetch the complete documentation index at: https://mintlify.com/prisma/prisma-next/llms.txt
Use this file to discover all available pages before exploring further.
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
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.
Path to
prisma-next.config.ts. Defaults to ./prisma-next.config.ts in the current working directory.Emit a machine-readable JSON envelope instead of the default TTY output.
Quiet mode — suppresses all output except errors.
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.
What it displays
Operations with class badges
Each operation is listed with a badge indicating its class:| Badge | Class | Meaning |
|---|---|---|
[additive] | additive | Creates new schema elements; safe to apply to any database. |
[widening] | widening | Expands an existing constraint or type; generally safe. |
[destructive] | destructive | Drops or modifies schema elements in a way that may lose data. |