CICD-309 · Prisma migration
Encyclopedia · Database delivery and migration · All snippets
Previous · CICD-308 · Next · CICD-310
1. Where it fits
- Placement CI deploy step.
- Prerequisites disposable database, migration tools and a scoped database role.
- Platforms local-linux, github-actions, gitea-actions.
2. Copy the snippet
bash
npx --no-install prisma migrate deploy
npx --no-install prisma migrate status3. How it works
Prisma applies committed migrations against the configured datasource and reports consistency separately.
4. Verify the result
Run npm ci first with pinned Prisma CLI and a scoped DATABASE_URL. Expect applied migrations and no schema mismatch.
Validation syntax-validated (Bash parse). Status definitions.