Skip to main content
Prisma Documentation Docs

Search documentation

Type to search this documentation.

On this pageOverview

status

The prisma migrate status command checks the migrations in ./prisma/migrations/* and the entries in the _prisma_migrations table to report the state of your migrations.

prisma migrate status [options]

The datasource URL configuration is read from the Prisma config file (e.g., prisma.config.ts).

Option Description
-h, --help Display help message
--config Custom path to your Prisma config file
--schema Custom path to your Prisma schema

In versions 4.3.0 and later, prisma migrate status exits with code 1 when:

  • A database connection error occurs
  • Migration files haven't been applied to the database
  • Migration history has diverged from the database state
  • No migration table is found
  • Failed migrations are found
Status

3 migrations found in prisma/migrations

Your local migration history and the migrations table from your database are different:

The last common migration is: 20201127134938_new_migration

The migration have not yet been applied:

20201208100950_test_migration

The migrations from the database are not found locally in prisma/migrations:

20201208100950_new_migration
title="bun"
bunx prisma migrate status
pnpm
pnpm prisma migrate status
yarn
yarn prisma migrate status
npm
npx prisma migrate status
title="bun"
bunx prisma migrate status --schema=./alternative/schema.prisma
pnpm
pnpm prisma migrate status --schema=./alternative/schema.prisma
yarn
yarn prisma migrate status --schema=./alternative/schema.prisma
npm
npx prisma migrate status --schema=./alternative/schema.prisma
Suggest an edit

Propose a replacement for this page. The site team reviews it before applying any changes.

Export
Documentation menu