Prisma Next is in early access.Read the docs

prisma-next migration apply

Apply pending Prisma Next migrations.

prisma-next migration apply applies pending on-disk migrations to the database.

Use it from a controlled deployment step after reviewing migration packages.

Usage

prisma-next migration apply --db "$DATABASE_URL"

Options

OptionWhat it does
--db <url>Connects to the database.
--config <path>Reads a specific prisma-next.config.ts file.
--ref <name>Applies migrations up to a named target ref.
--jsonPrints a machine-readable result.
prisma-next migration status --db "$DATABASE_URL"
prisma-next migration apply --db "$DATABASE_URL"
prisma-next migration status --db "$DATABASE_URL"
prisma-next db verify --db "$DATABASE_URL"

Run migration status before and after applying migrations to see what changed.

Applying to a ref

If your project uses named migration refs, apply up to a target ref:

prisma-next migration apply --db "$DATABASE_URL" --ref production

Manage refs with prisma-next migration ref.

On this page