Prisma Next is in early access.Read the docs

prisma-next migration ref

Manage named Prisma Next migration refs.

prisma-next migration ref manages named refs stored with your migration history.

Refs let you name a migration hash and use that name in commands such as prisma-next migration apply --ref <name>.

Usage

prisma-next migration ref set production sha256:abc...
prisma-next migration ref get production
prisma-next migration ref list
prisma-next migration ref delete production

Subcommands

SubcommandWhat it does
set <name> <hash>Writes or updates a ref.
get <name>Prints the hash for a ref.
listLists all refs.
delete <name>Deletes a ref.

Options

OptionWhat it does
--config <path>Reads a specific prisma-next.config.ts file.
--jsonPrints a machine-readable result.

Example workflow

prisma-next migration ref set production sha256:abc...
prisma-next migration status --db "$DATABASE_URL" --ref production
prisma-next migration apply --db "$DATABASE_URL" --ref production

Use refs when environments need named targets instead of always applying to the latest migration on disk.

On this page