prisma-next db sign
Sign a database with the current Prisma Next contract.
prisma-next db sign verifies that the live database satisfies the emitted contract and writes the database signature.
Use it after importing or inferring an existing schema, or after a deployment flow that already applied the required database changes.
Usage
prisma-next db sign --db "$DATABASE_URL"Options
| Option | What it does |
|---|---|
--db <url> | Connects to the database. |
--config <path> | Reads a specific prisma-next.config.ts file. |
--json | Prints a machine-readable result. |
Example
prisma-next contract emit
prisma-next db sign --db "$DATABASE_URL"
prisma-next db verify --db "$DATABASE_URL"When to use it
Use db sign only after you believe the live database already matches the emitted contract. It is common after:
contract inferfor a brownfield database- a manually reviewed migration flow
- a database restore that you need to mark as matching the current contract
Do not use db sign to hide drift. If verification fails, fix the contract or database first.