Prisma Next is in early access.Read the docs

prisma-next db verify

Verify a database against the current Prisma Next contract.

prisma-next db verify checks whether the database marker and live schema match your emitted contract.

Use it in CI and deployment checks before application code that depends on a contract reaches users.

Usage

prisma-next db verify --db "$DATABASE_URL"

Options

OptionWhat it does
--db <url>Connects to the database.
--config <path>Reads a specific prisma-next.config.ts file.
--marker-onlyChecks only the database marker.
--schema-onlyChecks only whether the live schema satisfies the contract.
--strictFails if the database includes schema elements not present in the contract.
--jsonPrints machine-readable output.

Examples

prisma-next db verify --db "$DATABASE_URL"
prisma-next db verify --db "$DATABASE_URL" --strict
prisma-next db verify --db "$DATABASE_URL" --schema-only
prisma-next db verify --db "$DATABASE_URL" --marker-only

Use JSON output in automation:

prisma-next db verify --db "$DATABASE_URL" --json

What failures mean

FailureMeaning
Marker mismatchThe database was not signed for the emitted contract, or the contract changed after signing.
Schema mismatchThe live database does not satisfy the emitted contract.
Strict mismatchThe database has extra schema elements not present in the contract.
Extension mismatchThe contract requires an extension that is not wired in the config.

Fix the database or contract, emit again if needed, then verify again.

On this page