# prisma-next migration status (/docs/cli/next/migration-status)

> For the complete Prisma documentation index, see [llms.txt](https://www.prisma.io/docs/llms.txt). A markdown version of any docs page is available by appending `.md` to its URL.

Show Prisma Next migration history and applied state.

Location: CLI > Next > prisma-next migration status

`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 [#usage]

```bash
prisma-next migration status
```

## Options [#options]

| Option            | What 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.         |
| `--graph`         | Shows the full migration graph with branches.  |
| `--limit <n>`     | Limits displayed migrations. Defaults to `10`. |
| `--all`           | Shows full history.                            |
| `--json`          | Prints a machine-readable result.              |

## Examples [#examples]

```bash
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 [#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`](https://www.prisma.io/docs/cli/next/db-verify) after applying migrations to check the final database shape against the emitted contract.

## Related pages

- [`CLI configuration`](https://www.prisma.io/docs/cli/next/configuration): Configure Prisma Next CLI commands with prisma-next.config.ts and global flags.
- [`prisma-next contract emit`](https://www.prisma.io/docs/cli/next/contract-emit): Emit Prisma Next contract artifacts.
- [`prisma-next contract infer`](https://www.prisma.io/docs/cli/next/contract-infer): Infer a starter contract from an existing database.
- [`prisma-next db init`](https://www.prisma.io/docs/cli/next/db-init): Initialize a database from the current Prisma Next contract.
- [`prisma-next db schema`](https://www.prisma.io/docs/cli/next/db-schema): Inspect a live database schema.