prisma-next db update
Update a database to match the current Prisma Next contract.
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
prisma-next db update --db "$DATABASE_URL"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
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
For reviewable database changes in version control, use prisma-next migration plan and prisma-next migration apply.
Use db update for local development, preview environments, and workflows where direct reconciliation is acceptable.