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
| Option | What 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. |
--json | Prints a machine-readable result. |
Recommended flow
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 productionManage refs with prisma-next migration ref.