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 status shows the full migration graph and, when given a database connection, marks which migrations have been applied and which are still pending. Without a database connection the command works entirely offline, rendering the graph structure from disk. All named refs stored in migrations/refs.json are overlaid on the graph regardless of mode, giving you a complete picture of where each environment sits relative to the migration history.
Options
Database connection string. When provided, the command enters online mode: it reads the current database marker and shows applied/pending status. Defaults to
config.db.connection if set.Target a named ref from
migrations/refs.json instead of the contract hash. The active ref is highlighted in bold; other refs are dimmed. In ref mode, the CONTRACT.AHEAD warning is suppressed.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 graph metadata and timings.
Online vs offline mode
migration status adapts its output based on whether a database connection is available.
Without --db (offline mode): Reads migration packages from disk and renders the graph structure. Useful for reviewing migration history in CI or on machines without database access. Contract and ref markers are still shown.
With --db (online mode): Connects to the database, reads the current marker hash, and annotates the graph with applied/pending status. Shows the distance from the current database position to the ref or contract target (e.g., “2 edge(s) behind ref”).
Graph display markers
The graph uses the following inline markers to show context at each node:| Marker | Meaning |
|---|---|
◄ DB | The node where the database’s current marker points. |
◄ Contract | The node corresponding to the current contract.json hash. |
◄ ref:<name> | The node a named ref points to. |
Branched graphs and AMBIGUOUS_TARGET
When the migration graph has multiple branches (two or more migrations share the same starting contract hash), the command cannot automatically determine a single target without additional guidance:--ref to point status at a named ref that sits on a specific branch, or by running migration ref set to assign refs to each branch.
Ref mode and CONTRACT.AHEAD suppression
When--ref is provided, the command uses the ref’s hash as the target instead of the contract hash. This suppresses the CONTRACT.AHEAD warning that would otherwise appear when contract.json is ahead of the ref target — in multi-environment workflows, the contract being ahead of a ref is expected and not an error.