Supported ORMs
What each Drift Mode parser reads, the Fix commands per ORM, and known parser limits.
For: developers.
Drift Mode currently ships with parsers for five ORMs. This page documents what each one reads and what it can't see yet.
| ORM | Parser status | Fix direction supported |
|---|---|---|
| Prisma | Full | Both (push and pull) |
| Drizzle | Full | Both (push and pull) |
| TypeORM | Full | Code → DB (migration generation) |
| Django | Full | Both (makemigrations / inspectdb) |
| Rails | Full | Both (db:migrate / db:schema:dump) |
| Knex | Not parsed for drift | — |
| Sequelize | Not parsed for drift | — |
The CLI (qdeck) detects Knex and Sequelize for connection purposes — it can open QueryDeck connected to a Knex or Sequelize project. But Drift Mode needs a typed schema definition, and Knex/Sequelize keep schema in migration files (procedural code) rather than a declarative schema. That style doesn't map cleanly to a diff.
Prisma
Reads: schema.prisma and optional *.prisma files referenced via multiSchema.
What's parsed:
- Models (tables) and their fields (columns)
- Field types, mapping Prisma types to canonical types via the type map
?nullable suffix@id,@unique,@@unique,@@index@default(...)values (includingnow(),uuid(),cuid())@relation(...)foreign keys withonDeleteandonUpdate@map(...)for table/column name overrides@@map(...)for table name overrides
Fix commands:
- Code ahead of DB →
{runner} prisma migrate dev - DB ahead of code →
{runner} prisma db pull
Known limits:
@@checkconstraints are not compared.- Composite types are not parsed (preview feature in Prisma).
- View models (
viewkeyword) are detected but not diffed against database views yet.
Drizzle
Reads: the file pointed to by drizzle.config.ts's schema: field. Often schema.ts, db/schema.ts, or drizzle/schema.ts.
What's parsed:
pgTable(...),mysqlTable(...),sqliteTable(...)declarations- Column factories:
text(...),varchar(...),integer(...),boolean(...),timestamp(...),jsonb(...), etc. - Modifiers:
.notNull(),.unique(),.primaryKey(),.default(...),.$default(...) references(() => other.column, { onDelete, onUpdate })for foreign keysindex(...)anduniqueIndex(...)declarationsserial,uuid,bigserialautoincrement variants
Fix commands:
- Code ahead of DB →
{runner} drizzle-kit push - DB ahead of code →
{runner} drizzle-kit introspect
Known limits:
enum(...)declarations are parsed but enum values must be inline (not imported from another file).- The parser doesn't follow
importstatements across files. If your schema is split across many files, list them indrizzle.config.ts'sschema:field as an array. - Custom types via
customType(...)are accepted but not compared by name.
TypeORM
Reads: data-source.ts / data-source.js, plus the entity files referenced by the entities field.
What's parsed:
@Entity(...)classes mapped to tables@Column(...),@PrimaryColumn(),@PrimaryGeneratedColumn(),@CreateDateColumn(),@UpdateDateColumn()- Column options:
type,nullable,unique,default,length,precision,scale @ManyToOne,@OneToMany,@ManyToManyfor relations (FKs)@JoinColumn(...)for explicit FK column names@Index(...)declarations@Unique([...])composite unique constraints
Fix commands:
- Code ahead of DB →
{runner} typeorm migration:generate -d data-source.ts <name> && {runner} typeorm migration:run -d data-source.ts
Known limits:
- Embedded entities (
@Embedded) are flattened to their columns but the embed name isn't preserved. @Tree(...)tree entities are parsed as their underlying table; tree-specific columns aren't validated.- The
synchronize: trueconfig is honored — if your data source has it, Drift Mode tells you that drift is expected to auto-resolve on app boot and suggests reviewing only what's stable.
Django
Reads: the model files of every installed app, discovered via settings.INSTALLED_APPS and the Django app autoload convention (<app>/models.py).
What's parsed:
models.Modelsubclasses → tables (named<app>_<model>by default, orMeta.db_tableif set)- Field types:
CharField,TextField,IntegerField,BigIntegerField,BooleanField,DateField,DateTimeField,JSONField,UUIDField,DecimalField,FloatField, custom fields fall back to "unknown" - Field options:
null,blank,default,max_length,unique,db_index,db_column ForeignKey,OneToOneField,ManyToManyFieldfor FKs and join tablesMeta.indexes,Meta.constraints,Meta.unique_togetherMeta.db_table,Meta.managed = False
Fix commands:
- Code ahead of DB →
python manage.py makemigrations && python manage.py migrate - DB ahead of code →
python manage.py inspectdb
Known limits:
Meta.managed = Falsetables are detected and listed but not diffed (you're telling Django not to manage them).- Custom
Fieldsubclasses are accepted but their type is shown as "custom: ClassName" in the diff — comparison is best-effort. - Multi-database setups (
DATABASES['readonly']) are detected; only the connection you opened in QueryDeck is compared.
Rails
Reads: db/schema.rb (the snapshot) primarily, with app/models/*.rb cross-referenced for relationship and validation hints.
What's parsed:
create_tableblocks inschema.rb→ tables- Column types:
string,text,integer,bigint,boolean,date,datetime,timestamp,decimal,float,json,jsonb - Column options:
null:,default:,limit:,precision:,scale:,comment: t.references :name, foreign_key: { on_delete: :cascade }for FKsadd_index ... unique: trueadd_foreign_keyoutside ofcreate_table
Fix commands:
- Code ahead of DB →
rails db:migrate - DB ahead of code →
rails db:schema:dump
Known limits:
- If you use
structure.sqlinstead ofschema.rb(setconfig.active_record.schema_format = :sql), Drift Mode falls back to parsing SQL DDL — this works for PostgreSQL but is less rich for MySQL. - Polymorphic associations are not enforced at the database level, so Drift Mode reports the underlying columns (
*_type,*_id) but doesn't validate the polymorphic relationship.
When your ORM isn't listed
If you use Eloquent, MikroORM, Mongoose (for MongoDB), Diesel, sqlx, or any other ORM, Drift Mode won't run today. You can still use every other feature of QueryDeck on the same connection.
Want your ORM supported? Open the in-app feedback button and tell us which one, with a link to a small example repo. We prioritize based on demand.
What's next
- What is Drift Mode? for the conceptual overview
- Reading the diff — how to interpret what the parser found
- The Fix button — what runs and how