Prisma Next is in early access.Read the docs

prisma-next migration new

Scaffold a Prisma Next migration package for manual authoring.

prisma-next migration new creates a migration package with a migration.ts file for manual authoring.

Use it when the generated plan is not enough and you want to write the migration operations yourself.

Usage

prisma-next migration new --name split-name

Options

OptionWhat it does
--name <slug>Sets the migration directory name suffix.
--from <hash>Sets the starting contract hash. Defaults to the latest migration target.
--config <path>Reads a specific prisma-next.config.ts file.
--jsonPrints a machine-readable result.

Examples

prisma-next migration new --name split-name
prisma-next migration new --name custom-fk --from sha256:abc...

After scaffolding

Edit the generated migration package, then inspect it:

prisma-next migration show

Apply the migration only after review:

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

Manual migrations should still end at a contract state that matches the emitted contract.

On this page