What is schema drift in plain terms?
Schema drift is when your application's idea of the database (your Prisma or Drizzle schema file, your migration history, your ORM model definitions) and the actual live database disagree. The drift is usually invisible until a deploy or a migration silently rewrites one side to match the other and breaks production. It is one of the most common 'how did this even happen' bugs in modern app stacks.
How does schema drift differ from a migration conflict?
A migration conflict happens at apply time and the migration tool refuses to run. Drift is the opposite: nothing fails. The DB is in state A, the code thinks it is in state B, and queries run, sometimes returning wrong data, sometimes corrupting on write. Drift survives PR review because it is not in the diff. You only see it in the next incident.
Why do Prisma migrate and Drizzle Kit miss drift?
They cover different parts of the problem. Drizzle Kit push introspects the live database and computes code-vs-database changes, and --explain can preview those changes without applying them. drizzle-kit check checks migration-history consistency, not the live database. Prisma migrate dev detects development drift with a shadow database, while Prisma explicitly documents that migrate deploy does not look for production drift. QueryDeck Drift Mode is a read-only ORM-vs-live-database view you can open while working, instead of making migration application the moment you discover the mismatch.
What kinds of drift does QueryDeck Drift Mode catch?
Today: missing or extra columns, column type drift (including TIMESTAMP vs TIMESTAMPTZ), nullable mismatches, default value drift, missing or extra simple indexes, missing or extra foreign keys, enum type drift. Five ORMs supported (Drizzle, Prisma, TypeORM, Django, ActiveRecord). Not yet: functional indexes, check constraints, triggers, generated columns, custom types like PostGIS. The CLI version covers a wider tool surface than Drift Mode.
Does Drift Mode run in CI or only locally?
Drift Mode is documented today as an interactive QueryDeck feature. When qdeck opens a recognized project, QueryDeck parses the ORM schema, introspects the connected database, and opens Drift Mode when it finds differences. A dedicated headless CI drift command is not documented today, so this page does not claim one.
What databases is Drift Mode available on?
PostgreSQL and MySQL have full introspectable-schema support. SQLite is supported with reduced fidelity. MongoDB does not use the same relational schema model, so Drift Mode does not apply there in the same way. All four databases still work with the rest of QueryDeck.