# prisma-next db update (/docs/cli/next/db-update)

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

Update a database to match the current Prisma Next contract.

Location: CLI > Next > prisma-next db update

`prisma-next db update` compares the live database with the emitted contract and applies the required changes.

Use it for direct reconciliation when you do not need a checked-in migration package.

## Usage [#usage]

```bash
prisma-next db update --db "$DATABASE_URL"
```

## Options [#options]

| Option            | What it does                                              |
| ----------------- | --------------------------------------------------------- |
| `--db <url>`      | Connects to the database.                                 |
| `--config <path>` | Reads a specific `prisma-next.config.ts` file.            |
| `--dry-run`       | Shows planned operations without applying them.           |
| `-y`, `--yes`     | Confirms prompts where the command supports confirmation. |
| `--json`          | Prints a machine-readable result.                         |

## Recommended flow [#recommended-flow]

```bash
prisma-next contract emit
prisma-next db update --db "$DATABASE_URL" --dry-run
prisma-next db update --db "$DATABASE_URL"
prisma-next db verify --db "$DATABASE_URL"
```

Use `--dry-run` before applying changes in shared environments.

## When to use migrations instead [#when-to-use-migrations-instead]

For reviewable database changes in version control, use [`prisma-next migration plan`](https://www.prisma.io/docs/cli/next/migration-plan) and [`prisma-next migration apply`](https://www.prisma.io/docs/cli/next/migration-apply).

Use `db update` for local development, preview environments, and workflows where direct reconciliation is acceptable.

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