Prisma · tool · fg-0292

prisma migrate dev in CI or against a shared database detects drift and wants to reset the schema

If you see Drift detected: Your database schema is not in sync with your migration history, the cause and the fix for Prisma are below, last verified 2026-10-15.

Verified Oct 2026trust 50/100
Symptom
Drift detected: Your database schema is not in sync with your migration history.We need to reset the "public" schema at ... All data will be lost.The CI step stops at the reset prompt or exits without applying anything
Cause
migrate dev is a development command that replays history in a shadow database and offers to reset when the live schema differs. migrate deploy only applies pending migrations and never checks drift, resets, or uses a shadow database.
Fix
Use migrate deploy in CI, staging, and production, and keep migrate dev for local databases you can wipe.
Apply
npx prisma migrate deploy
Affected
Prisma ORM 6 and 7; prompt text reproduced on 7.10.0
Sources

Last verified 2026-10-15 · Confirmed by 0 builders

Related traps

Have your agent know this before it fails

$ /plugin marketplace add getfootgun/footgun
$ /plugin install footgun@footgun