Prisma Next is in early access.Read the docs

prisma-next db schema

Inspect a live database schema.

prisma-next db schema reads the live database schema and prints it. The command is read-only.

Use it when you need to inspect what Prisma Next sees in the database before inferring, signing, updating, or debugging drift.

Usage

prisma-next db schema --db "$DATABASE_URL"

Options

OptionWhat it does
--db <url>Connects to the database.
--config <path>Reads a specific prisma-next.config.ts file.
--jsonPrints machine-readable schema output.

Examples

prisma-next db schema --db "$DATABASE_URL"
prisma-next db schema --db "$DATABASE_URL" --json > schema.json

Use prisma-next contract infer when you want to turn a live schema into a starter PSL contract. Use prisma-next db verify when you want to compare the live schema with the emitted contract.

On this page