Skip to content
Back to the playbook

Fixing DrizzleError from a missing column or table on D1

Drizzle ORMCloudflare D1revision 1

Diagnostic tree

  1. In progressDrizzleError: column/table does not existA query built from a Drizzle schema fails because the underlying D1 database doesn't actually have the column or table the schema.ts model describes.
View the whole map (7 more steps)
  • Check whether a migration for this change was ever generated
  • Generate and apply the missing migration
  • Check whether the migration exists but wasn't applied to this target
  • Apply the pending migration to the failing target
  • Migration exists and is applied — escalate
  • Confirm the column exists, then re-run the query
  • Resolved

What to test

DrizzleError: column/table does not exist

A query built from a Drizzle schema fails because the underlying D1 database doesn't actually have the column or table the schema.ts model describes.

What happened?