Prisma Next is in early access.Read the docs

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 status

Options

OptionWhat 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.
--graphShows the full migration graph with branches.
--limit <n>Limits displayed migrations. Defaults to 10.
--allShows full history.
--jsonPrints 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 production

Reading 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.

On this page