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 productionSubcommands
| Subcommand | What it does |
|---|---|
set <name> <hash> | Writes or updates a ref. |
get <name> | Prints the hash for a ref. |
list | Lists all refs. |
delete <name> | Deletes a ref. |
Options
| Option | What it does |
|---|---|
--config <path> | Reads a specific prisma-next.config.ts file. |
--json | Prints 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 productionUse refs when environments need named targets instead of always applying to the latest migration on disk.