Drizzle ORM Type Reference

Quick lookup table for Drizzle column builders, their SQL equivalents, and inferred TypeScript types — across PostgreSQL, MySQL, and SQLite. Click any Drizzle method to copy it.

Import from drizzle-orm/pg-core · 25 of 25 shown

TypeDrizzle methodSQL equivalentTypeScript type
integer
INTEGERnumber
smallint
SMALLINTnumber
bigint
mode: "bigint" yields bigint
BIGINTnumber | bigint
serial
Auto-increment primary key
SERIALnumber
bigserial
BIGSERIALnumber | bigint
smallserial
SMALLSERIALnumber
numeric
Returned as string to preserve precision
NUMERIC(p,s)string
decimal
DECIMAL(p,s)string
real
REALnumber
doublePrecision
DOUBLE PRECISIONnumber
boolean
BOOLEANboolean
text
TEXTstring
varchar
VARCHAR(n)string
char
CHAR(n)string
uuid
UUIDstring
date
Use mode: "date" for JS Date
DATEstring
time
TIMEstring
timestamp
TIMESTAMPDate
timestamp w/ tz
TIMESTAMPTZDate
interval
INTERVALstring
json
JSONunknown (typed via $type)
jsonb
JSONBunknown (typed via $type)
bytea
BYTEABuffer
pgEnum
Declared outside pgTable
CREATE TYPE ... AS ENUMunion of literals
array
INTEGER[]number[]

How to read this table

  • Type — short name of the Drizzle column type, including variants like integer (timestamp) for SQLite mode options.
  • Drizzle method — the exact call you write inside pgTable / mysqlTable / sqliteTable. Click it to copy.
  • SQL equivalent — what drizzle-kit emits in your migration files.
  • TypeScript type — what InferSelectModel infers for that column by default.

Tips

  • For json / jsonb columns, use .$type<Shape>() to get a typed payload instead of unknown.
  • numeric / decimal return strings in JS — Drizzle avoids silent float rounding.
  • SQLite has no native boolean, date, or JSON types — integer and text with mode handle them.