Drizzle Release Notes
22 release notes curated from 24 sources by the Releasebot Team. Last updated: Nov 21, 2026
- November 2026
- No date parsed from source.
- First seen by Releasebot:Nov 21, 2026
- Modified by Releasebot:Nov 23, 2026
Drizzle ORM, Drizzle Kit and Drizzle Pulse v1.0.0-rc.6 release
Drizzle releases a major update to ORM, Kit, and Pulse, adding a new PostgreSQL driver with pipelining, bulk operations, and change-data capture, plus live query updates and SQLite large row IDs. The release also overhauls type decoding, removes query caching, and brings extensive fixes alongside significant breaking changes.
Drizzle ORM
Breaking changes
- Drivers no longer configure output decoding in drivers’ configurations - following configurations set by drizzle constructors were removed:
- client.options.bigint = true from bun-sql/postgres, bun-sql/mysql
- transparent decoders from postgres-js
- global types.setTypeParser(...) from neon-http, netlify-db
- per-query parser overrides from raw mode and other queries not decoded by codecs (node-postgres, node-postgres/dsql, vercel-postgres, neon-serverless, netlify-db, cockroach, pglite, mysql2)
Important: postgres-js still overrides client’s param serializers (client-wide, replacing user-configured ones) for timestamptz (1184), timestamp (1114), date (1082), time (1083) and their arrays:
- Date values are sent as value.toISOString() - same as postgres.js’ default for timestamptz, timestamp, date
- strings are sent as is to be parsed by the server - postgres.js’ default re-encodes them via new Date(value).toISOString(), which reads offset-less timestamps in process’ local time, truncates microseconds and throws on values JS can’t parse ('infinity', '12:00:00')
- time switches Date processing from date.toString() to ISO string
sqlite: integer-based codecs (integer, integer:boolean, integer:timestamp, integer:timestamp_ms) accept number, bigint and integer text, which makes them independent of safe integer modes (better-sqlite3’s defaultSafeIntegers, bun:sqlite’s safeIntegers, node:sqlite’s readBigInts, libsql’s intMode)
Important: Results of raw queries (db.execute(sql...)) now honor driver’s configuration
Note: Codecs only cover client options with predictable output (bigint, safeIntegers, intMode, decimalNumbers, jsonStrings, …). Custom parsing functions (pg’s types.setTypeParser(...)/types.getTypeParser, postgres’ types, mysql2’s typeCast) that change output of types drizzle doesn’t request per query still require custom codecs, e.g.:
[Code examples for custom mysql2 and postgres-js codecs]
Removed cast codecs: selected columns are no longer wrapped in casts (::text, cast(... as char), epoch milliseconds, …) and set operations in select ... from (...) "drizzle_union" (except singlestore). toSQL() / getSQL() of query builders lost their withCastCodecs switch. This fixes select distinct ... order by being invalid on pg, cockroach, mysql, mssql (fixes #6673). Changes that came with it:
- Returned data:
- Queries decoded by codecs (with a mapper - not db.execute, db.call) request lossless output per query; the overrides are exported for proxy servers, which apply them in their own callback implementations (nodePgRawTextTypes, nodePgDsqlRawTextTypes, neonServerlessRawTextTypes, neonHttpRawTextTypes, vercelPgRawTextTypes, netlifyDbRawTextTypes, nodeCockroachRawTextTypes, pgliteRawTextParsers, decodePostgresJsRawRows, makeMySql2RawTextTypeCast, makeSingleStoreRawTextTypeCast, makePlanetscaleRawTextCast, tidbRawTextDecoders, awsDataApiRawTextResultSetOptions)
- node-postgres, node-postgres/dsql, neon-serverless, neon-http, vercel-postgres, netlify-db, cockroach: per-query types returning date, timestamp, timestamptz, interval, numeric[] and their arrays as text (fixes #6290); pglite: per-query parsers for the same types; postgres-js: raw mode, decoding the same types as text and others with the client’s own parsers
- mysql2, singlestore: per-query typeCast (bigint, decimal, date, datetime, timestamp as text, json parsed, other fields through the client’s own typeCast); planetscale-serverless: per-query cast; tidb-serverless: per-query decoders; aws-data-api/pg: longReturnType: 'STRING'
- better-sqlite3, node-sqlite, bun-sqlite, tursodatabase, tursodatabase-sync, tursodatabase-serverless, effect-sqlite-node, effect-sqlite-bun: integers as bigints per statement, so numeric keeps integers past the safe range. Important: Integer sql fields without .mapWith() are bigints on these drivers
- Other drivers’ output is decoded as returned. Column types the driver returns with data already lost throw Column type "" is not supported with the driver:
- Driver quirks, decoded as returned:
- float rounded to 6 significant digits (mysql2, singlestore, planetscale-serverless; bun-sql/mysql in queries without bound parameters); time cut to milliseconds, BC dropped from fractional timestamps, null array elements dropped (aws-data-api/pg, postgres/aurora); BC dates read as Invalid Dates, years 1 - 99 of timestamptz read as 19xx (effect-pglite); microseconds of string-mode timestamp, datetime (bun-sql/postgres, bun-sql/mysql, effect-postgres)
- Set operation fields are decoded by the left-hand side’s codec (pg, cockroach, mssql, singlestore) or the codec of the combined type (mysql, sqlite).
- Drizzle instance creation:
- effect-mysql2: make rejects clients created without dateStrings: true (poolConfig, or ?dateStrings=true in url) or with decimalNumbers: true
- bun-sql/sqlite: drizzle() rejects SQL clients created without safeIntegers: true (or bigint: true)
- Corrections of earlier release notes:
- rc.4 “Fixed mysql float rounding”: holds for effect-mysql2 only, other drivers round per the quirk above
- rc.4 “Fixed mysql cropping .000 from timestamp(3)”: holds except for effect-mysql2, bun-sql/mysql, which drop trailing zeros of fractional seconds
- rc.4 set operator drizzle_union wrapping and combined-type codecs: see set operations above
- rc.5 bun-sql/mysql, mysql2, singlestore “cast codecs”: replaced by per-query typeCast (mysql2, singlestore) and decoding as returned (bun-sql/mysql)
- rc.5 withCastCodecs switch, “Fixed cast codecs being applied to selection fields of inner queries”, “Fixed sqlite generating View, Subquery queries with cast on numeric columns”: no longer apply
- rc.5 “Fixed mysql date column being affected by server’s timezone” (#1442): effect-mysql2 requires dateStrings: true for it
- rc.5 “Fixed effect-mysql, bun-sql/mysql drivers losing time fraction”: effect-mysql2 drops trailing zeros of the fraction
- rc.5 aws-data-api/pg time({ withTimezone: true }) results converted to UTC: such columns throw now (see above)
- Returned data:
postgres-js: supported postgres 4 (json[], jsonb[] params are sent as typed elements on 4, as array literals on 3); bumped the tested version to 4.1.1 - postgres before 4.0.0 decodes null array elements as NaN, 'NULL', false or throws (json, jsonb)
Changed postgresJsCodecs (drizzle-orm/postgres-js, drizzle-orm/postgres-js/dsql), bunSqlPgCodecs (drizzle-orm/bun-sql/postgres) from plain objects to (client) => codecs functions due to json param wrapper functions only being accessible from drivers via client.json(param)
Fixed bun-sql/mysql datetime in string returning trailing zeroes for empty second fractions
Bumped minimal supported version of @types/mssql peer dependency from 9.1.4 to 9.1.11 to match declarations of [email protected]; changed mssql, @types/mssql peer dependency version requirements from ^ to >=
Changed shapes of dialect-specific concat, substring expressions (drizzle-orm/-core/expressions) to match their dialects’ functions
Fixed subqueries selected as fields being inferred as non-nullable - a subquery can return no rows, so their values are now typed as | null.
Removed query caching: drizzle-orm/cache/core and drizzle-orm/cache/upstash modules, cache option of drizzle constructors, db.$cache, .$withCache() of select queries, withCache option of relational queries, EffectCache service of Effect drivers
mysql, singlestore: $returningId can no longer be combined with onDuplicateKeyUpdate as the result can’t report updated rows’ ids
pg, cockroach, mysql, singlestore, sqlite no longer silently drop non-positive pagination params
pg: removed .concurrently() from indexes - migrations run inside a transaction, where create index concurrently can’t be executed
Fixed Effect drivers waiting for query logger to finish execution to execute query: logging is now detached with Effect.forkDetach
Removed migrations table upgrade helpers, replaced by migrators shared across runtimes and drivers
drizzle-orm is published as ESM only: CommonJS output (.cjs, .d.cts) and require export conditions were removed. Added engines.node: ^20.19.0 || >=22.12.0
drizzle-orm/postgres: the Drizzle Postgres driver (formerly @drizzle-team/minipg) now ships inside drizzle-orm
New features
- Drizzle Postgres (drizzle-orm/postgres):
- Added db.pipeline([...]) for sending queries back-to-back on one pooled connection and db.parallel([...]) for running queries concurrently across the pool. Both run without a shared transaction and return one PromiseSettledResult per query.
- db.batch([...], options) accepts transaction options (isolation, readOnly, deferrable, snapshot). The driver sends the batch in one round trip and exposes telemetry as response.metrics when you pass metrics: true | 'ms' | 'us'.
- Added db.bulkInsert(table, rows, options?) for multi-row inserts and db.bulkUpdate(table, rows, { by }) for updates matched by key using unnest.
- Added drizzle-orm/postgres/pglite - Drizzle Postgres over an in-process PGlite instance (named statements, pipelining, batch, pipeline, bulk methods)
- Added Effect drivers for Drizzle Postgres: drizzle-orm/postgres/effect, drizzle-orm/postgres/effect/http, drizzle-orm/postgres/effect/neon-http, drizzle-orm/postgres/effect/aurora
- Added drizzle-orm/postgres/cdc - change data capture over logical replication (replicate(options), pool.replicate(options))
- drizzle-orm/postgres: the driver detects transaction-mode poolers of more vendors from host and port and adjusts named statements and pipelining to them; undetectable poolers are declared with pooler: true or ?pooler=true / ?pgbouncer=true. Pipelining depth defaults to 'auto'
- sqlite: added rowId.big() for row ids past Number.MAX_SAFE_INTEGER
Improvements and fixes
- Fixed effect-postgres failing to encode empty array params
- Fixed effect-postgres bigint, bigserial columns in bigint mode returning strings
- Fixed db.$client of effect drivers being typed as the client’s interface instead of its service’s shape
- Fixed bun-sql/postgres bigint, bigserial columns in bigint mode returning strings
- Fixed bun-sql/postgres empty multidimensional integer arrays being returned as Int32Array
- Fixed is() narrowing columns to never
- Fixed validators inferring string instead of enum members for columns of enums made from TS enums
- Fixed postgres-js errors on json, jsonb columns’ params with boolean, Date, Buffer, Uint8Array values and arrays starting with them
- Fixed bun-sql/postgres errors on json, jsonb columns’ params with top-level number, boolean, Buffer, Uint8Array values
- Fixed bun-sql/postgres with prepare: false errors on json, jsonb columns’ params
- Fixed node-postgres, neon-serverless, vercel-postgres, netlify-db errors on json, jsonb columns’ params with Date, Buffer, Uint8Array values
- Fixed type errors in emitted declarations with skipLibCheck: false
- Fixed query builders dropping offset with 0 value
- Fixed transactions returning client to the pool after failed begin
- Fixed durable-sqlite .get() and .run() leaving statements unfinished on multi-row results
- Fixed sqlite-core onConflictDoNothing({ target, where }) placing where after do nothing
- Fixed pg, cockroach timestamp, date columns failing to encode Date values outside of year 1 - 9999 range
- Fixed pg, cockroach timestamp, date columns in date mode decoding values that new Date(text) misreads
- Fixed pg, cockroach timestamp, date columns in date mode being decoded as wrong dates or Invalid Date in sessions with non-ISO DateStyle
- Documented aws-data-api/pg, postgres/aurora time columns losing fractional seconds past milliseconds and timestamp columns losing the BC suffix
- Fixed not returning SQL | undefined for SQLWrapper input
- Fixed pg transaction config allowing snapshot without isolationLevel: 'repeatable read' | 'serializable'
- Fixed null elements of pg, cockroach array columns being passed into decoders/encoders instead of being kept as null
- Fixed json, jsonb pg, cockroach array elements being written as JSON null instead of SQL null
- Fixed: [BUG]: durable-sqlite migrate hides the error of a failed migration behind TransactionRollbackError
- Fixed $dynamic() builders being rejected by helpers constrained by generic builder types
- Fixed cockroach insert().$dynamic(), update().$dynamic() builders losing .returning() result type and joins’ nullability for update
- Fixed pg db.$count() not being accepted as an item of batch, pipeline, parallel
Drizzle Kit
Breaking changes
- postgres snapshot format bumped to 10 following removal of .concurrently() from drizzle-orm pg indexes
- drizzle-kit is published as ESM only: the drizzle-kit binary, drizzle-kit/api-, drizzle-kit/cli and drizzle-kit/payload/ entries lost their CommonJS builds and require export conditions. Added engines.node: ^20.19.0 || >=22.12.0
Improvements
- Faster pull/push introspection on large schemas and faster PostgreSQL schema diffing
- pull errors now carry their underlying cause for every dialect
- MSSQL pull returns indexes sharing one name across tables in a stable order
Fixes
- [BUG]: PostgreSQL: after drizzle-kit pull, generate and push emit SET DEFAULT for a numeric column with an expression default
- Fixed drizzle-kit pull writing native function text into CockroachDB restrictive policies.
- [BUG]: SQLite generate ignores an index changing between uniqueIndex and index
- [BUG]: Dropping a column writes a failing migration when a check or unique constraint naming it changes in the same diff
- [BUG]: drizzle-kit pull (MySQL) fails with “Check constraint conflict” when another database on the same server has a CHECK constraint with the same name
- [BUG]: SQL Server drizzle-kit pull error when IDENTITY seed = 0
- [BUG]: drizzle-kit push fails to introspect MSSQL schemas owned by Microsoft Entra users
- [BUG]: drizzle-kit for postgres generates incorrect migration when changing IDENTITY column to uuid
- Pull request #6188
- [BUG]: drizzle-kit pull writes an expression default as plain code or as a string for several column types
- [BUG]: MySQL generate stops when a new foreign key points to a table that is not exported from the schema
- [BUG]: drizzle-kit pull crashes on MSSQL when tablesFilter excludes referenced FK table
- [BUG]: SQLite pull reports every error after the connection as “Failed to connect to or introspect the SQLite database”, dropping the cause
- [BUG]: MySQL generate ignores onUpdateNow() for string-mode timestamp/datetime (rc.5)
- [BUG]: MySQL generate creates child foreign key before its new parent unique index (rc.5)
- [BUG]: SQLITE migration incorrectly uses ALTER table when adding a column with a non-constant default
- [BUG]: SQLite generate orders DROP TABLE alphabetically, so a parent can be dropped before the child that references it
- [BUG]: drizzle-kit ignores tsconfig paths mapping "" under Node (only trailing / keys supported)
- [BUG]: drizzle-kit’s tsconfig path-alias resolver does not follow “extends”
Drizzle Pulse
Drizzle Pulse keeps query results up to date by streaming changes from PostgreSQL’s write-ahead log. It requires wal_level = logical and now follows the same release version as Drizzle ORM and Drizzle Kit.
In this example, a live collection tracks orders with the accepted status. The event stream reports inserts, updates and deletes relative to that query result.
Breaking changes
- Peer dependencies: drizzle-orm raised to ^1.0.0-rc.6; removed @drizzle-team/minipg; removed zod - query arguments take any Standard Schema
- CDC event stream and live collection events are relative to the query result: insert has row, update has the full row and oldRow, delete has oldRow. matchesNew and old_row were removed from the embedded event types
- .args() takes any Standard Schema with synchronous validation. Invalid arguments throw an error listing the validation issues.
- PulseBuilder type parameters are now TTable, TSelection, TArgsInput, TArgsOutput, TResult, TFlags
- pulse(t).query(fn) types ctx.args as Record<never, never>; .args() throws after a where-function
- Queries built with .transform() or .limit() are missing from runtime.client and runtime.events at compile time
- Opening a CDC event stream with a where on a column excluded by .columns() throws
- Opening a live collection or a CDC event stream takes no auth option; removed PulseCollectionOptions
- TelemetryEvent: committedAt, appliedAt renamed to committedAtMicros, appliedAtMicros
- QueryDescriptor moved from drizzle-pulse to drizzle-pulse/client; PulseAuthContext is exported from drizzle-pulse only
- PulseCollection has a private constructor
- EmbeddedRuntimeConfig is a type alias, as it takes either databaseUrl or client
- start() only adds tables to the publication
- Removed the drizzle-pulse/package.json export
New features
- drizzle-pulse/embedded: added standalone provision({ queries, databaseUrl, wal })
- createRuntime() and provision() take an optional client - a Drizzle Postgres Pool - in place of databaseUrl
- Added onResync, onError options for CDC event streams
- drizzle-pulse exports PulseAuthContext, PulseQueryContext, WhereClause types
Improvements and fixes
- ColumnOperators.in accepts readonly arrays
- Errors and JSDoc use the terms live collection and CDC event stream, and document microsecond units, the slot name prefix and the publication rules
- November 2026
- No date parsed from source.
- First seen by Releasebot:Nov 3, 2026
Drizzle ORM and Drizzle Kit v1.0.0-rc.5 release
Drizzle ships major ORM and Kit updates, improving relational queries, database codecs, caching, transactions and schema migrations. The release also introduces breaking changes, new query capabilities and fixes across database drivers and dialects.
Drizzle ORM
Breaking changes
Fixed postgres-js transparent parsers set by drizzle() constructors breaking driver’s own serializers for timestamptz, timestamp, date, time, json, jsonb types (fixes #3171, #4426, #5789). Note: Any existing workarounds with manual JSON.stringify(jsonValue) in raw sql or raw driver calls must be removed to prevent double stringification of JSON params; For array-type JSON params in sql use sql.param(jsonArrayValue) to avoid it being parsed as value list instead of param.
Restricted undefined value passed to fields in relational queries’ where - now throws an error upon encountering undefined in filters, added EmptyFilter symbol (import { EmptyFilter } from 'drizzle-orm/relations') that can be used as an explicit replacement of undefined where possibly absent filter is desired by design rather than possible bug (fixes #5636). Example:
db.query.users.findMany({ where: { isActive: params.isActive ?? EmptyFilter } })Relation filters without conditions ({}, or containing only empty conditions) are now skipped like any other empty filter instead of generating exists (...) check of relation’s presence - use true to filter by relation’s presence, false - by its absence. Example:
// Previously: `where exists (select * from "posts" ...)`, now: no filter db.query.users.findMany({ where: { posts: {} } }) // Users with at least one post db.query.users.findMany({ where: { posts: true } })Updated postgres codecs: now generic codecs contain only in-json codecs (mirroring mysql), contents of drivers’ codecs remain unchanged
Switched pg bytea in-json codecs from encode(..., 'base64') casts to decoding to_json’s native hex output
Made nested select join nullification consider SQL field data during nullification
Fixed sqlite ignoring .$defaultFn(...) on insert when .default(...) is present
Untied bun-sql/mysql, mysql2, singlestore column mapping from connection config, removed forced bigint params on their respective configs, replaced with more stable cast codecs
Reworked cockroach column builders to mirror pg - now both have same .array('[][]...') syntax
Moved View exports from drizzle-orm/sql/sql to drizzle-orm/view
getTableUniqueName no longer prefixes aliased views or tables with their schema
getTableUniqueName no longer sets public. prefix for entities without schema
Updated View class: switched to Table-like object config for type template, typed schema property
Updated withReplicas (indirectly fixes #4185):
- Now every query goes to primary db by default
- To query replica, explicitly call db.$replica
Added withCastCodecs = false switch to getSQL(), withCastCodecs = true switch to toSQL() of non-relational query builders - now db.select(...).from(...).getSQL() emits query without cast codecs by default
Reworked sqlite-proxy:
- Added rowMode: 'array' | 'object' switch for 'all' | 'get' execute methods
- Dropped { rows: Result[] } callback result wrapping - now expected direct return of expected data
- Replaced callback, batchCallback with SqliteProxyExecutors object - must provide run, all, get handlers & optional batch handler
- Dropped values execute method due to it being duplicate of array-mode all
- Added TRunResult type inference based on return type of run executor, updated SqliteRemoteDatabase template with TRunResult argument
- Added per-item rowMode: 'array' | 'object' to batch, batch is expected to mirror executors’ return types per query
Fixed the sqlite-proxy result type for get (data | undefined at runtime, previously data[] in types) (fixes #5461, #3394)
Fixed sqlite db.get(sql) return type lacking | undefined for queries without returned rows
Omitted query params from DrizzleQueryError by default, added paramsInErrors option to drizzle constructor to enable query params in DrizzleQueryError (fixes #5939). Example:
const db = drizzle({ connection: 'postgres://...', paramsInErrors: true })For mysql, postgres, cockroach, mssql set RQBv2 to new query build strategy to fix slow query plans (fixes #5245). Can be opted out of per query via strategy switch: db.query.users.findMany({ strategy: 'basic' }). When used, may break direct references to relations in raw SQL syntax where, orderBy:
// posts with the most comments first db.query.posts.findMany({ with: { author: true, comments: true }, orderBy: (t, { sql }) => sql`json_array_length("comments"."r") desc, ${t.id}`, // "comments" becomes unreachable due to query nesting limit: 2, }); // posts of verified authors db.query.posts.findMany({ with: { author: true }, where: { RAW: (t, { sql }) => sql`("author"."r"->>'verified')::boolean` }, // "author" becomes unreachable due to query nesting });Moved StringChunk, commonStringChunks exports from drizzle-orm/sql/sql to drizzle-orm/sql/common-chunks (still exported from drizzle-orm/sql)
Switched RQBv2 build functions to chunk collection: each accepts optional trailing collectTo: SQLChunk[] array to push chunks to and returns chunk arrays instead of SQL. Note: Chunk arrays embedded into sql directly are rendered as value lists - wrap them in new SQL(chunks) to use them as query parts.
- relationsFilterToSQL(...).sql: SQL | undefined -> SQLChunk[] | undefined, added collectTo parameter
- relationsOrderToSQL(...): SQL | undefined -> SQLChunk[] | undefined, added collectTo parameter
- relationsOrderEntriesToSQL(...): replaced parts: SQL[] parameter with collectTo: SQLChunk[], start?: number; RelationsOrderSource’s from, filters are now SQLChunk[], SQLChunk[][]
- relationExtrasToSQL(...).sql: SQL | undefined -> SQLChunk[] | undefined, added collectTo parameter
- relationToSQL(...): { filter?: SQL; joinCondition?: SQL } -> { filter: SQLChunk[]; joinCondition?: SQLChunk[] }, added filterTo, joinConditionTo parameters
- getTableAsAliasSQL(...): SQL -> SQLChunk[], added collectTo parameter
Relational queries are now cached by caches with all strategy (global: true), opt out per query via withCache: false
Replaced DBQueryConfigWithComment type with DBQueryConfigRoot - config of root relational query containing all root-only options (strategy, comment, withCache); dialects’ relational query builders accept it with options they don’t support omitted
Improvements and fixes
Updated RQB filters to allow branded types in shortcut-form eq filter (fixes #5298)
Fixed $onUpdateFn being executed without need (fixes #5780)
Fixed $onUpdateFn potentially overriding explicit nulls
Fixed zod schema generator returning unknown-templated coerced types (fixes #5659)
Fixed mysql2 constructor setting param in potentially undefined mistyped config (fixes #5972)
Fixed non-jit mapper nullification triggering on single null column (fixes #1603)
Preserved qualifiers for column chunks of sql fields in selection when non-current table’s column is referenced (fixes #5734)
Optimized query building, mapper generation
Allowed empty returns in callback-style orderBy, extras, RAW of relational queries
Removed unused _ field in RelationsHelperStatic
Fixed naming: isReversed to isFilterReversed in Relation
objects, arrays db.execute modes (db.all, db.get in sqlite) (bypasses #4464)
Fixed jit mapper nullifying nested selection objects with columns from different tables
Fixed selection group nullification not triggering on objects with deeply nested fields (joined view or subquery)
Fixed geometry, geography & box array types data getting reduced to one item due to wrong delimiter used during pgArray construction\parsing
Added delimiter customization to makePgArray, parsePgArray utilities
Optional explicit column lists for db.insert (workaround for #5001, #5309)
- Usage: db.insert(users, 'name', 'email').values([{ name: 'First', email: '[email protected]' }, { name: 'Second', email: '[email protected]' }])
Transaction snapshot support for pg dialect
Fixed pg transaction config related errors on empty but present config (fixes #1772)
Supported transaction config in effect pg drivers
Bump tursodatabase library versions
Supported transaction configs for tursodatabase drivers
Fixed mysql transaction options being joined on wrong separator
Supported isolationLevel in bun-sql/mysql transactions
Removed transaction config from effect-sqlite, effect-mysql due to lack of support in drivers
Explicit error throws on unsupported transaction configs
Partial transaction config support for libsql, tidb drivers
Improved error messages on unknown fields in RQBv2 selection (fixes #5367)
Fixed op-sqlite transaction being handled as synchronous
Fixed broken op-sqlite query executors (fixes #5936)
Bumped op-sqlite to v17 (fixes #5928)
Fixed expo-sqlite not finalizing prepared statements
Added expo-sqlite/async for async querying (fixes #5240)
Added local sha256 hash function as a fallback for cache query hashing in environments without globalThis.crypto available
Fixed dynamic query builders blocking query builder’s variable reassignment after applying nullable joins by defaulting to not-null behavior on not yet joined column groups in selection (fixes #4232)
Fixed bytea not being included in pg table creation callback format column list
Moved SQL.usedTables calculation from constructor to getter
Fixed false relation name collision error and relational filter misrouting for relation names shadowing Object.prototype properties like constructor (fixes #6076)
Updated neon-http migrator to automatically rollback failed migrations
Bump effect to 4.0.0 (fixes #6162, #6403, #6412)
Improved hash for query name generation & query cache key
Bump typebox to 1.2.0 (fixes #5981)
Fixed internal type errors in built code
Updated mssql, cockroach, singlestore sessions to new format
Added missing lateral (apply), cross joins, insert ... select, db.$count to mssql
Added explicit error on attempt to insert multiple default-only rows in mssql
Fixed blob columns on React Native drivers: writes no longer require Buffer, op-sqlite and expo-sqlite reads normalized to Uint8Array. Use blob(...).$type() to override column’s type
Fixed cast codecs being applied to selection fields of inner queries in pg, mysql
Fixed double space following order by in set operation queries
Fixed MSSQL, MySQL, SingleStore serial types returning different types based on column’s value
Fixed sqlite generating View, Subquery queries with cast on numeric columns
Codec system for sqlite, cockroach, mssql, singlestore
Migrated mssql, cockroach to RQBv2
Removed redundant limit 1 from relational where, coalesce for json arrays in sqlite in RQBv2
Removed RQBv1 schema from DrizzleConfig
Fixed mysql2 not using codecs from config over driver’s default when provided
Added delimiter customization to makeCockroachArray, parseCockroachArray utilities, mirroring their pg counterparts
Fixed cockroach geometry arrays being unwritable due to wrong delimiter
Fixed cockroach array parser dropping backslashes from string values
Fixed cockroach int4[] being parsed to string[]
Added mapper caching for queries reused without .prepare()
Fixed table extra config not rejecting unsuitable for field values (fixes #6140)
Fixed subquery derived from .$dynamic() query builder being unusable with .from, .*Join (fixes #4069)
Fixed Placeholder value field described as declare protected: TValue instead of declared protected value: TValue; Set name field to protected and marked getSQL as @deprecated to prevent field from bleeding into relational filters’ autocomplete
Fixed Subquery.getSQL() (fixes #2174)
Fixed relational queries not supporting Subquery type fields in View s
Fixed alias function returning materialized views typed as regular views
Added typed isAlias: boolean type config property to View, Table to identify if it was aliased
Added isTableAlias, getTableSchema utils, supported View in getTableName util
Supported Subquery as relational entity in RQBv2:
- Subquery must have flat selection, same as View
- Every used Subquery will be invoked only once in WITH section on root level of relational query, every reference will use it’s alias
- Same query can’t have reference multiple Subquery instances with same alias
Fixed excessive memory consumption on mysql, mssql, singlestore iterators
Fixed mysql2 iterators leaving connection un-drained & deadlocked on errors
Fixed mysql2 iterators hanging when connection is dropped mid-stream
Fixed ExtraConfigColumn.getSQL() recursing into stack overflow (fixes #6050)
Fixed sqlite dropping | undefined from .get() return type of db.update(table).set(...).returning()
Fixed sqlite dropping | undefined from .get() return type of db.insert(table).values(...).returning() with .onConflictDoNothing() or .onConflictDoUpdate({ where: ... }) present, db.insert(table).select(...).returning() (fixes #6107)
Fixed select codecs leaking into builders passed as sql operator argument
Fixed undefined = null, bigint = mimic string, different data view type collisions in hashQuery (fixes #5842)
Fixed concurrent query + cache invalidation run (fixes #5828)
Fixed cached query invalidation for:
- tables in nested SQL & subqueries
- aliased and tableCreator-prefixed tables
- tables defined on schemas
- joined & aliased tables of query builders embedded into raw sql
- tables used in filters, selected fields, order clause, set operators, CTE-s
Added getCacheKey(table) util returning the name query cache tracks a table by (schema.name, or name for tables without schema; aliases resolve to their original tables)
Fixed orderBy of set operations dropping table qualifiers in passed sql objects (e.g. desc(column))
Supported DSQL adapters for postgres-js (@aws/aurora-dsql-postgresjs-connector) - drizzle-orm/postgres-js/dsql, node-postgres (@aws/aurora-dsql-node-postgres-connector) - drizzle-orm/node-postgres/dsql
Fixed param codecs getting applied to inlined params
Reworked db.execute types (fixes #661):
- Plain db.execute(sql) - returns union every possible response type by driver
- db.execute(sql) - returns rowless response type (i.e. insert without returning)
- db.execute - driver response with rows typed as ReturnedObject[]
Fixed db.execute(sql) type template rejecting interfaces
Typed effect drivers’ raw db.execute, db.run (fixes #6382)
Fixed RQBv2 query config lacking type errors with typescript@6 and above (fixes #5644, #6383)
Fixed mysql date column being affected by server’s timezone (fixes #1442)
Fixed effect-mysql, bun-sql/mysql drivers losing time fraction
Fixed SQLiteBigInt attempting to use Buffer in encoder without Buffer present in environment (fixes #2043)
Fixed durable-sqlite db.get(sql) throwing on queries returning zero or more than one row instead of returning undefined or the first row
Fixed node-postgres transaction crashing process if connection is dropped mid-transaction (fixes #6437)
Fixed node-postgres transaction leaking the pool client on BEGIN error (fixes #6341)
Fixed failed transaction rollback error replacing the original error that triggered it
Added ordering by relations to RQBv2:
// Select users sorted by last post db.query.users.findMany({ orderBy: { posts: { createdAt: 'desc(max)' } } }) // Select users sorted by post count db.query.users.findMany({ orderBy: { posts: 'asc(count)' } }) // Select admin posts first, sort rest by creation date db.query.posts.findMany({ orderBy: { author: { isAdmin: 'desc' }, createdAt: 'desc' } })Added cache support to RQBv2 via withCache switch:
- true - cache query
- false - never cache query
- undefined - cache only with all cache strategy
db.query.users.findMany({ with: { posts: true }, withCache: true })Fixed instanceof not working reliably for drizzle classes in monorepos with multiple library instances
Fixed aws-data-api/pg:
- Array params throwing Unknown type error - now sent as pg array literals
- Object params throwing Unknown type error - now sent as JSON with JSON type hint
- Multidimensional arrays in results being returned as raw ArrayValue objects
- char(n) params being truncated to a single character by ::char cast
- inet values gaining full-width netmask (/32, /128) in results
- time({ withTimezone: true }) values losing their offset: params were cast to ::time, results were converted to UTC by Data API
Fixed pg time({ withTimezone: true }) columns using time codecs instead of timetz ones
Fixed inArray/notInArray empty arrays do not work with SQL Server
Fixed node-postgres pool client is not released when transaction BEGIN rejects
Fixed Batch insert crashes with RangeError when row-count × column-count exceeds 8 k rows × 15 cols (120 k params)
Fixed Composition of not and or/and yields compile error
Fixed Negative limit not working in SQLite
Fixed Pooled transaction() leaks the pool client when BEGIN fails (node-postgres / neon-serverless / vercel-postgres)
Fixed node-postgres transaction() leaks the client on a rejected BEGIN and returns broken clients to the pool
Drizzle Kit
- Added incremental PostgreSQL snapshots. The initial snapshot stores the full schema; subsequent snapshots store structured diffs and metadata for migration commutativity checks across branches.
- Added support for custom PGLite options (fixes #2995, #4476 and #3222)
- Fixed defineConfig allowing fields from every config variant simultaneously
- Fixed SQLite push glues the table’s FOREIGN KEY clause onto a generated-column ALTER ADD, breaking all inserts
- Fixed SQLite push table recreate silently drops UNIQUE from a column that also has a plain index
- Fixed drizzle-kit generates DROP COLUMN before DROP INDEX causing PostgreSQL error 42704
- Fixed false positive detection of schema changes for default values
- Fixed drizzle-kit pull rewrites “character” inside public enum type names to “char”
- Fixed drizzle-kit pull error when there are comments in a view definition
- Fixed Invalid schema default value generated for sequence-based primary keys in Postgres
- Fixed Small typo in drizzle-kit/src/index.ts
- Fixed drizzle-kit pull reports index_duplicate for valid MSSQL index names reused across tables
- Fixed drizzle-kit pull generates many() instead of one() for one-to-one relations (unique FK columns)
- Fixed AWS Data API Postgres - incompatibility with latest @aws-sdk/client-rds-data (3.932.0)
- drizzle-kit pull for SQLite Generates Constraints from Comments in Schema
- Fixed drizzle-kit pull fails with column_unsupported_unique for unique indexes on text/mediumtext/longtext columns
- Fixed drizzle-kit CLI pull/introspect schemaFilters parameter is ignored
- Fixed Changing a view to materialized view doesn’t generate correct migration
- Fixed SQLite incorrectly scaffolds boolean column with drizzle-kit pull
- Fixed Introspection fails if SQLite database has a references without column name
- Fixed SQLite pull drops or merges CHECK constraints depending on DDL formatting
- Fixed SQLite pull reads a partial index’s WHERE off the table’s DDL, losing real predicates and inventing false ones
- Fixed drizzle-kit pull generates a many-to-many whose junction table is one of its own endpoints, and drops the one-relations the foreign keys describe
- Fixed SQLite pull crashes on any expression index, because .on() doesn’t filter the keys the line above it does
- Fixed drizzle-kit push tries to DROP Neon system roles despite provider: “neon”
- Fixed drizzle-kit pull crashes on MSSQL when tablesFilter excludes referenced FK table
- Fixed drizzle-kit pull generates invalid through relations for composite foreign keys
- Fixed drizzle-kit pull: schema and relations disagree on camelCase for acronym columns (CallID → callId vs callID)
- Fixed drizzle-kit pull drops single-column PK/FK constraint names from schema.ts (kept nameExplicit in snapshot): pull→generate demands rename-or-create hints for every legacy-named constraint + Drizzle Kit introspection creates different foreign key names than migration
- Filtered PlanetScale’s __neki schema for postgresql dialect
- Fixed drizzle-kit pull treats domain tables with exactly two foreign keys as junction tables
- Fixed drizzle-kit pull fails with a confusing error if the database can’t be reached
- Fixed drizzle-kit generate drops column alterations when a column with the same name is renamed in another table
- Updates in pull command - migration.sql is no longer has comments when running pull --init
- Fixed drizzle-kit v1 generateMigration cannot resolve create/delete ambiguity programmatically (no HintsHandler). generateMigration and pushSchema from drizzle-kit/payload/* and drizzle-kit/api-postgres accept { hints } as the last argument: an array of the hint objects that the CLI --hints flag takes. If a rename question or a data loss confirmation has no hint, they throw an error with code: 'missing_hints' and the list of entities in missingHints. Entity ids use public as the schema for SQLite and MySQL and dbo as the default schema for MSSQL
- Fixed generateMigration from drizzle-kit/payload/sqlite and drizzle-kit/payload/mysql changing the snapshots that it gets when an indexed column is renamed
- Fixed SQLite introspection failing with chalk is not defined when a foreign key references a table that has no primary key and the foreign key names no column
- Fixed drizzle-kit push failing with a database error when a renamed table, a table moved to another schema or a table in a renamed schema also needed a data loss check
- Updated the data loss warnings of drizzle-kit push: all dialects use the same texts and quote every name as in SQL. A warning shows the table by the name that the database has before the push, and adds (would become ...) when the push renames or moves the table
- drizzle-kit push asks to confirm a dropped column only when the column has a non-null value. Before, PostgreSQL, CockroachDB, MySQL, SingleStore and SQLite asked when the table had a row
- Fixed drizzle-kit pull writing SQL text with a backslash, a backtick or ${ into the schema file without escaping it. The pulled schema now compiles and keeps this text in these places. PostgreSQL and CockroachDB: check constraints, views, generated columns, policies, index expressions, index predicates, and default expressions that pull writes as a sql template. CockroachDB: enum values. MSSQL: check constraints, views, generated columns, index predicates, and default expressions that pull writes as a sql template. SQLite: generated columns, and default expressions of integer and text columns. For MySQL the pulled schema now compiles when a check constraint, or a default expression that pull writes as a sql template, has a backtick or ${. MySQL returns a backslash in this text already escaped, so pull writes it unchanged
- The postgresql dialect rejects --ignore-conflicts in generate, check and migrate. drizzle-kit generate --fix-conflicts replaces it
- The bundled agent skills are one skill named drizzle now. After drizzle-kit skills adds it, the command removes the seven older skills from the project without a question: drizzle-generate, drizzle-push, drizzle-pull, drizzle-migrations, drizzle-hints, drizzle-output-modes and drizzle-responses-and-errors
- Fixed drizzle-orm not being listed as peer dependency
- Fixed dev dependencies being listed as production
- Fixed composition of not with or or and causing compile errors.
- Fixed snakeCase.table converting Korean column names to empty identifiers.
- Fixed the missing decimal property when using pgTable.
All of your release notes in one feed
Join Releasebot and get updates from Drizzle and hundreds of other software products.
- November 2026
- No date parsed from source.
- First seen by Releasebot:Nov 3, 2026
Drizzle ORM and Drizzle Kit v1.0.0-rc.4 release
Drizzle releases broad ORM and Drizzle Kit updates, improving query typing, codecs, SQLite and MySQL support, and database drivers. Drizzle Kit adds machine-readable CLI output, a public SDK, MCP tools, and bundled skills for AI coding assistants.
Drizzle ORM
- Fixed broken View types when using Subquery in selection
- Fixed custom types’ JSON field API not being applied when column is used as a decoder on SQL fields
- Fixed codecs not getting applied to SQL field when .mapWith(column) is set (fixes #5724)
- Fixed Subquery fields’ columns’ codecs not being applied to subquery
- Fixed broken in rc.3 db.select in bun-sql/pg driver (fixes #5779)
- Updated SQLite db.$count builder to include .sync() executor for sync drivers
- Removed RQBv1 from sqlite, removed RQBv1 TSchema, TFullSchema arguments from sqlite entities’ generics
- Fixed instances of sqlite query errors not being wrapped in DrizzleQueryError (db.batch() excluded due to api incompatibility)
- Fixed type error on CockroachArrayBuilder constructor caused by referencing internal field’s type
- Removed mapResult method from PreparedQuery interface, removed mapResult, mapBatchResult from pg and sqlite raw queries
- Fixed wrong bun-sqlite run result type
- Switched sqlite RQBv2 to array mode
- Enabled optimized default query mappers for sqlite
- Reworked sqlite sessions: replaced per-driver PreparedQuery instances with executors passed via sessions, similar to current postgresql and mysql implementations, moved useJitMappers flag handling to dialect
- Fixed missing string overload on .comment(sqlCommenterComment) in query builders
- Supported nested transactions in @tursodatabase/database, @tursodatabase/database-wasm
- Added filesystem-free migrator for @tursodatabase/database-wasm at drizzle-orm/tursodatabase/wasm-migrator
- Split SQLite into async, effect versions (sync remains subtype of async)
- Removed SQLiteSyncDialect, SQLiteAsyncDialect, moved generic SQLite async\sync migrators to sqlite-core/async/session as migrateSync, migrateAsync
- Fixed sqlite cache using same cache entry for different execute methods
- Moved EffectDrizzlePgConfig to drizzle-orm/pg-core/effect/utils
- Made cache field in EffectCacheShape optional
- Split mysql into async, effect versions
- Added codec system to mysql
- Fixed mysql float rounding to either 6 digits or double
- Fixed mysql cropping .000 from timestamp(3)
- Moved subquery mapper selection from dialect.buildSelection to orderSelectedFields;
- [PG, MySQL] Improved codec system in set operators:
- When different db types are crossed in a union, db casts them to type it deems as closest compatible to all types involved
- If columns with codecs are set on both sides of union - codec of combined type will apply
- If only the left-hand side of union has field with codec - left hand side’s codec is preserved
- If left-hand side field is devoid of codecs - field is not processed by codecs;
- Set operator queries are switched from [QUERY 1] UNION [QUERY 2] to SELECT ... FROM ([QUERY 1] UNION [QUERY 2]) "drizzle_union" so cast codecs would apply after union’s type mutation
- Retrieved data of union with different types still may be lossy due to db’s own conversion
- Bump required effect package versions to 4.0.0-beta.83
- Fixed sql.param passing Placeholder as expected input value to encoder function instead of Placeholder’s value type
- Fixed unguarded Buffer reference in drizzle-orm/effect-schema that caused error in environments without Buffer
- Fixed sqlite blob column runtime-type default mode mismatch (fixes #1064)
- Improved typed sql operator - preserved nullability, inferred initial data type to mapWith callback argument, added .nullable() method to modify output type with | null (fixes #571):
// Before: sql<Type | null>`...`.mapWith((v: any) => String(v)) // Output type: string // After: sql<Type | null>`...`.mapWith((v: Type) => String(v)) // Output type: string | null // `.nullable()` method: sql`...`.mapWith((v: unknown) => new Type(v)).nullable() // Output type: Type | null- Fixed generatedByDefaultAsIdentity columns not being filtered from inserts in runtime in postgres dialect
- Improved db.insert(table).select(...): removed column order match requirement, allowed skipping selection for columns with defaults or nullability (fixes #3608)
Drivers
- Updated @tursodatabase/database, @tursodatabase/database-wasm to v0.6.0, updated session internals for asynchronous prepare on driver side
- Added @tursodatabase/serverless driver support
- Added @tursodatabase/sync driver support
- Added @effect/sql-pglite driver support
- Added @effect/sql-sqlite-node driver support
- Added @effect/sql-sqlite-bun driver support
- Added @effect/sql-sqlite-do driver support
- Added @effect/sql-sqlite-wasm driver support
- Added @effect/sql-libsql driver support
- Added @effect/sql-d1 driver support
- Added @effect/sql-mysql2 driver support
- Fixed @effect/sql-pg driver returning object response instead of raw response on db.execute
- pg-proxy: added dialect config to optional dialect creator callback
Drizzle Kit
- Fixed postgres pull from failing for non-admin roles (fixes #5568)
- Fixed: [mssql] INSERT includes generatedAlwaysAs (computed) columns in the column list: SQL Server error 271
Machine-readable output & programmatic SDK
- Added an --output text|json mode to generate, push, pull, up, export, and check. In json mode each command emits a typed JSON envelope (status, errors, payloads) for programmatic and agent consumption (see OUTPUT_MODES.md, JSON_CONTRACT.md)
- Shipped a public programmatic SDK at the drizzle-kit/cli subpath exposing generate(), push(), pull(), up(), exportSql(), and check() with typed options and results matching the CLI JSON contract (see SDK.md)
- Auto-detected non-interactive mode (--output json, or --output text with a non-TTY stdin) no longer renders interactive prompts. Instead, unresolved renames and destructive changes (confirm_data_loss) are surfaced as a missing_hints envelope (or a missing-decisions report under text) and resolved by supplying a structured hints array up front via --hints/--hints-file (see HINTS.md)
MCP server
- Added drizzle-kit mcp, a Model Context Protocol server over stdio that exposes the migration lifecycle (generate, push, check, export, up, pull) as MCP tools for any MCP-capable AI agent (see MCP.md)
Agent skills
- Added drizzle-kit skills, which installs Drizzle Kit’s bundled Agent Skills into your project for AI coding assistants. Ships 8 skills: drizzle, drizzle-generate, drizzle-hints, drizzle-migrations, drizzle-output-modes, drizzle-pull, drizzle-push, and drizzle-responses-and-errors (see drizzle-kit/skills folder)
Sources
- Published release
- Drizzle ORM changelog
- Drizzle Kit changelog
- Aug 5, 2024
- Date parsed from source:Aug 5, 2024
- First seen by Releasebot:Dec 9, 2025
DrizzleORM v0.32.2 release
Fix AWS Data API type hints bugs in RQB
Fix set transactions in MySQL bug
Add forwaring dependencies within useLiveQuery, fixes #2651
Export additional types from SQLite package, like AnySQLiteUpdate
- Aug 5, 2024
- Date parsed from source:Aug 5, 2024
- First seen by Releasebot:Dec 9, 2025
Drizzle Kit v0.23.2 release
Drizzle Kit v0.23.2 release
Aug 5, 2024
- Fixed a bug in PostgreSQL with push and introspect where the schemaFilter object was passed. It was detecting enums even in schemas that were not defined in the schemaFilter.
- Fixed the drizzle-kit up command to work as expected, starting from the sequences release.
Similar to Drizzle with recent updates:
- Anthropic release notes996 release notes · Latest Dec 4, 2026
- Vercel release notes3455 release notes · Latest Dec 4, 2026
- OpenAI release notes1268 release notes · Latest Dec 3, 2026
- Figma release notes193 release notes · Latest Dec 2, 2026
- Zed release notes182 release notes · Latest Dec 2, 2026
- Supabase release notes161 release notes · Latest Dec 1, 2026
- Jul 23, 2024
- Date parsed from source:Jul 23, 2024
- First seen by Releasebot:Dec 9, 2025
DrizzleORM v0.32.1 release
Fix typings for indexes and allow creating indexes on 3+ columns mixing columns and expressions
Added support for “limit 0” in all dialects - closes #2011
Make inArray and notInArray accept empty list, closes #1295
fix typo in lt typedoc
fix wrong example in README.md
- Jul 10, 2024
- Date parsed from source:Jul 10, 2024
- First seen by Releasebot:Dec 9, 2025
DrizzleORM v0.32.0 release
Drizzle delivers across ORM and drizzle-kit with MySQL returning IDs, PostgreSQL sequences and identity columns, generated columns for multiple dialects, and enhanced migrations. A new push --force and flexible migration prefixes simplify risky changes and tool integration.
Release notes for [email protected] and [email protected]
It’s not mandatory to upgrade both packages, but if you want to use the new features in both queries and migrations, you will need to upgrade both packages
New Features
🎉 MySQL $returningId() function
MySQL itself doesn’t have native support for RETURNING after using INSERT. There is only one way to do it for primary keys with autoincrement (or serial) types, where you can access insertId and affectedRows fields. We’ve prepared an automatic way for you to handle such cases with Drizzle and automatically receive all inserted IDs as separate objectsAlso with Drizzle, you can specify a primary key with $default function that will generate custom primary keys at runtime. We will also return those generated keys for you in the $returningId() call
If there is no primary keys -> type will be {}[] for such queries
🎉 PostgreSQL Sequences
You can now specify sequences in Postgres within any schema you need and define all the available propertiesExample
import { pgSchema, pgSequence } from "drizzle-orm/pg-core"; // No params specified export const customSequence = pgSequence("name"); // Sequence with params export const customSequence = pgSequence("name", { startWith: 100, maxValue: 10000, minValue: 100, cycle: true, cache: 10, increment: 2 }); // Sequence in custom schema export const customSchema = pgSchema('custom_schema'); export const customSequence = customSchema.sequence("name");🎉 PostgreSQL Identity Columns
Source: As mentioned, the serial type in Postgres is outdated and should be deprecated. Ideally, you should not use it. Identity columns are the recommended way to specify sequences in your schema, which is why we are introducing the identity columns featureExample
import { pgTable, integer, text } from 'drizzle-orm/pg-core'; export const ingredients = pgTable("ingredients", { id: integer("id").primaryKey().generatedAlwaysAsIdentity({ startWith: 1000 }), name: text("name").notNull(), description: text("description"), });You can specify all properties available for sequences in the .generatedAlwaysAsIdentity() function. Additionally, you can specify custom names for these sequences
PostgreSQL docs reference.
🎉 PostgreSQL Generated Columns
You can now specify generated columns on any column supported by PostgreSQL to use with generated columnsExample with generated column for tsvector
Note: we will add tsVector column type before latest release
import { SQL, sql } from "drizzle-orm"; import { customType, index, integer, pgTable, text } from "drizzle-orm/pg-core"; const tsVector = customType<{ data: string }>({ dataType() { return "tsvector"; }, }); export const test = pgTable("test", { id: integer("id").primaryKey().generatedAlwaysAsIdentity(), content: text("content"), contentSearch: tsVector("content_search", { dimensions: 3 }).generatedAlwaysAs((): SQL => sql`to_tsvector('english', ${test.content})`), }, (t) => ({ idx: index("idx_content_search").using("gin", t.contentSearch), }));In case you don’t need to reference any columns from your table, you can use just sql template or a string
export const users = pgTable("users", { id: integer("id"), name: text("name"), generatedName: text("gen_name").generatedAlwaysAs(sql`hello world!`), generatedName1: text("gen_name1").generatedAlwaysAs("hello world!"), });🎉 MySQL Generated Columns
You can now specify generated columns on any column supported by MySQL to use with generated columns
You can specify both stored and virtual options, for more info you can check MySQL docs
Also MySQL has a few limitation for such columns usage, which is described here
Drizzle Kit will also have limitations for push command:- You can’t change the generated constraint expression and type using push. Drizzle-kit will ignore this change. To make it work, you would need to drop the column, push, and then add a column with a new expression. This was done due to the complex mapping from the database side, where the schema expression will be modified on the database side and, on introspection, we will get a different string. We can’t be sure if you changed this expression or if it was changed and formatted by the database. As long as these are generated columns and push is mostly used for prototyping on a local database, it should be fast to drop and create generated columns. Since these columns are generated, all the data will be restored
- generate should have no limitations
Example
export const users = mysqlTable("users", { id: int("id"), id2: int("id2"), name: text("name"), generatedName: text("gen_name").generatedAlwaysAs((): SQL => sql`${schema2.users.name} || 'hello'`, { mode: "stored" }), generatedName1: text("gen_name1").generatedAlwaysAs((): SQL => sql`${schema2.users.name} || 'hello'`, { mode: "virtual" }), });In case you don’t need to reference any columns from your table, you can use just sql template or a string in .generatedAlwaysAs()
🎉 SQLite Generated Columns
You can now specify generated columns on any column supported by SQLite to use with generated columns
You can specify both stored and virtual options, for more info you can check SQLite docs
Also SQLite has a few limitation for such columns usage, which is described here
Drizzle Kit will also have limitations for push and generate command:- You can’t change the generated constraint expression with the stored type in an existing table. You would need to delete this table and create it again. This is due to SQLite limitations for such actions. We will handle this case in future releases (it will involve the creation of a new table with data migration).
- You can’t add a stored generated expression to an existing column for the same reason as above. However, you can add a virtual expression to an existing column.
- You can’t change a stored generated expression in an existing column for the same reason as above. However, you can change a virtual expression.
- You can’t change the generated constraint type from virtual to stored for the same reason as above. However, you can change from stored to virtual.
New Drizzle Kit features
🎉 Migrations support for all the new orm features
PostgreSQL sequences, identity columns and generated columns for all dialects🎉 New flag --force for drizzle-kit push
You can auto-accept all data-loss statements using the push command. It’s only available in CLI parameters. Make sure you always use it if you are fine with running data-loss statements on your database🎉 New migrations flag prefix
You can now customize migration file prefixes to make the format suitable for your migration tools:- index is the default type and will result in 0001_name.sql file names;
- supabase and timestamp are equal and will result in 20240627123900_name.sql file names;
- unix will result in unix seconds prefixes 1719481298_name.sql file names;
- none will omit the prefix completely;
Example: Supabase migrations format
import { defineConfig } from "drizzle-kit"; export default defineConfig({ dialect: "postgresql", migrations: { prefix: 'supabase' } });
- Jul 8, 2024
- Date parsed from source:Jul 8, 2024
- First seen by Releasebot:Dec 9, 2025
DrizzleORM v0.31.4 release
DrizzleORM v0.31.4 release
Jul 8, 2024
- Mark prisma clients package as optional - thanks @Cherry
- Jul 8, 2024
- Date parsed from source:Jul 8, 2024
- First seen by Releasebot:Dec 9, 2025
DrizzleORM v0.31.3 release
DrizzleORM v0.31.3 release
Jul 8, 2024
Bug fixed
- 🛠️ Fixed RQB behavior for tables with same names in different schemas
- 🛠️ Fixed [BUG]: Mismatched type hints when using RDS Data API - #2097
New Prisma-Drizzle extension
import { PrismaClient } from '@prisma/client'; import { drizzle } from 'drizzle-orm/prisma/pg'; import { User } from './drizzle'; const prisma = new PrismaClient().$extends(drizzle()); const users = await prisma.$drizzle.select().from(User);For more info, check docs: /docs/prisma
Original source - Jun 7, 2024
- Date parsed from source:Jun 7, 2024
- First seen by Releasebot:Dec 9, 2025
DrizzleORM v0.31.2 release
Added support for TiDB Cloud Serverless driver
Original sourceimport { connect } from '@tidbcloud/serverless'; import { drizzle } from 'drizzle-orm/tidb-serverless'; const client = connect({ url : '...' }); const db = drizzle(client); await db.select().from(...); - Jun 4, 2024
- Date parsed from source:Jun 4, 2024
- First seen by Releasebot:Dec 9, 2025
DrizzleORM v0.31.1 release
Drizzle ORM adds Expo SQLite live queries with a native useLiveQuery hook in v0.31.1, auto re-running queries on DB changes for both SQL-like and Drizzle queries. API stays compatible and returns data, error, updatedAt for streamlined React use.
New Features
Live Queries 🎉
For a full explanation about Drizzle + Expo welcome to discussions
As of v0.31.1 Drizzle ORM now has native support for Expo SQLite Live Queries! We’ve implemented a native useLiveQuery React Hook which observes necessary database changes and automatically re-runs database queries. It works with both SQL-like and Drizzle Queries:
import { useLiveQuery , drizzle } from 'drizzle-orm/expo-sqlite'; import { openDatabaseSync } from 'expo-sqlite'; import { users } from './schema'; import { Text } from 'react-native'; const expo = openDatabaseSync('db.db', { enableChangeListener : true }); // <-- enable change listeners const db = drizzle(expo); const App = () => { // Re-renders automatically when data changes const { data } = useLiveQuery(db.select().from(users)); // const { data, error, updatedAt } = useLiveQuery(db.query.users.findFirst()); // const { data, error, updatedAt } = useLiveQuery(db.query.users.findMany()); return <Text>{JSON.stringify(data)}</Text>; }; export default App;We’ve intentionally not changed the API of ORM itself to stay with conventional React Hook API, so we have useLiveQuery(databaseQuery) as opposed to db.select().from(users).useLive() or db.query.users.useFindMany()
We’ve also decided to provide data , error and updatedAt fields as a result of hook for concise explicit error handling following practices of React Query and Electric SQL
Original source - May 31, 2024
- Date parsed from source:May 31, 2024
- First seen by Releasebot:Dec 9, 2025
DrizzleORM v0.31.0 release
DrizzleORM 0.31.0 adds pg_vector index support, new PostgreSQL types (point, line, geometry), and PostGIS basics with a refreshed indexes API. Drizzle Kit upgrade integration and extension filtering improve push/generate workflows alongside notable fixes.
DrizzleORM v0.31.0 release
May 31, 2024
Breaking changes
Note: [email protected] can be used with [email protected] or higher. The same applies to Drizzle Kit. If you run a Drizzle Kit command, it will check and prompt you for an upgrade (if needed). You can check for Drizzle Kit updates below.
PostgreSQL indexes API was changed
The previous Drizzle+PostgreSQL indexes API was incorrect and was not aligned with the PostgreSQL documentation. The good thing is that it was not used in queries, and drizzle-kit didn’t support all properties for indexes. This means we can now change the API to the correct one and provide full support for it in drizzle-kit
Previous API
- No way to define SQL expressions inside .on.
- .using and .on in our case are the same thing, so the API is incorrect here.
- .asc(), .desc(), .nullsFirst(), and .nullsLast() should be specified for each column or expression on indexes, but not on an index itself.
Current API
// First example, with `.on()` index('name').on(table.column1.asc(), table.column2.nullsFirst(), ...) or.onOnly(table.column1.desc().nullsLast(), table.column2, ...).concurrently().where(sql``).with({ fillfactor: '70' }) // Second Example, with `.using()` index('name').using('btree', table.column1.asc(), sql`lower(${table.column2})`, table.column1.op('text_ops')).where(sql``).with({ fillfactor: '70' })New Features
🎉 “pg_vector” extension support
There is no specific code to create an extension inside the Drizzle schema. We assume that if you are using vector types, indexes, and queries, you have a PostgreSQL database with the pg_vector extension installed.
You can now specify indexes for pg_vector and utilize pg_vector functions for querying, ordering, etc.
Let’s take a few examples of pg_vector indexes from the pg_vector docs and translate them to DrizzleL2 distance, Inner product and Cosine distance
// CREATE INDEX ON items USING hnsw (embedding vector_l2_ops); // CREATE INDEX ON items USING hnsw (embedding vector_ip_ops); // CREATE INDEX ON items USING hnsw (embedding vector_cosine_ops); const table = pgTable('items', { embedding: vector('embedding', { dimensions: 3 }) }, (table) => ({ l2: index('l2_index').using('hnsw', table.embedding.op('vector_l2_ops')), ip: index('ip_index').using('hnsw', table.embedding.op('vector_ip_ops')), cosine: index('cosine_index').using('hnsw', table.embedding.op('vector_cosine_ops')) }))L1 distance, Hamming distance and Jaccard distance - added in pg_vector 0.7.0 version
// CREATE INDEX ON items USING hnsw (embedding vector_l1_ops); // CREATE INDEX ON items USING hnsw (embedding bit_hamming_ops); // CREATE INDEX ON items USING hnsw (embedding bit_jaccard_ops); const table = pgTable('table', { embedding: vector('embedding', { dimensions: 3 }) }, (table) => ({ l1: index('l1_index').using('hnsw', table.embedding.op('vector_l1_ops')), hamming: index('hamming_index').using('hnsw', table.embedding.op('bit_hamming_ops')), bit: index('bit_jaccard_index').using('hnsw', table.embedding.op('bit_jaccard_ops')) }))For queries, you can use predefined functions for vectors or create custom ones using the SQL template operator.
You can also use the following helpers:import { l2Distance, l1Distance, innerProduct, cosineDistance, hammingDistance, jaccardDistance } from 'drizzle-orm' l2Distance(table.column, [3, 1, 2]) // table.column <-> '[3, 1, 2]' l1Distance(table.column, [3, 1, 2]) // table.column <+> '[3, 1, 2]' innerProduct(table.column, [3, 1, 2]) // table.column <#> '[3, 1, 2]' cosineDistance(table.column, [3, 1, 2]) // table.column <=> '[3, 1, 2]' hammingDistance(table.column, '101') // table.column <~> '101' jaccardDistance(table.column, '101') // table.column <%> '101'If pg_vector has some other functions to use, you can replicate implimentation from existing one we have. Here is how it can be done
export function l2Distance(column: SQLWrapper | AnyColumn, value: number[] | string[] | TypedQueryBuilder<any> | string,): SQL { if (is(value, TypedQueryBuilder<any>) || typeof value === 'string') { return sql`${column} <-> ${value}`; } return sql`${column} <-> ${JSON.stringify(value)}`; }Name it as you wish and change the operator. This example allows for a numbers array, strings array, string, or even a select query. Feel free to create any other type you want or even contribute and submit a PR
Examples
Let’s take a few examples of pg_vector queries from the pg_vector docs and translate them to Drizzleimport { l2Distance } from 'drizzle-orm'; // SELECT * FROM items ORDER BY embedding <-> '[3,1,2]' LIMIT 5; db.select().from(items).orderBy(l2Distance(items.embedding, [3, 1, 2])) // SELECT embedding <-> '[3,1,2]' AS distance FROM items; db.select({ distance: l2Distance(items.embedding, [3, 1, 2]) }) // SELECT * FROM items ORDER BY embedding <-> (SELECT embedding FROM items WHERE id = 1) LIMIT 5; const subquery = db.select({ embedding: items.embedding }).from(items).where(eq(items.id, 1)); db.select().from(items).orderBy(l2Distance(items.embedding, subquery)).limit(5) // SELECT (embedding <#> '[3,1,2]') * -1 AS inner_product FROM items; db.select({ innerProduct: sql`(${maxInnerProduct(items.embedding, [3, 1, 2])}) * -1` }).from(items) // and more!🎉 New PostgreSQL types: point, line
You can now use point and line from PostgreSQL Geometric Types
Type point has 2 modes for mappings from the database: tuple and xy.- tuple will be accepted for insert and mapped on select to a tuple. So, the database Point(1,2) will be typed as [1,2] with drizzle.
- xy will be accepted for insert and mapped on select to an object with x, y coordinates. So, the database Point(1,2) will be typed as { x: 1, y: 2 } with drizzle
Type line has 2 modes for mappings from the database: tuple and abc.
- tuple will be accepted for insert and mapped on select to a tuple. So, the database Line3 will be typed as [1,2,3] with drizzle.
- abc will be accepted for insert and mapped on select to an object with a, b, and c constants from the equation Ax + By + C = 0. So, the database Line3 will be typed as { a: 1, b: 2, c: 3 } with drizzle.
🎉 Basic “postgis” extension support
There is no specific code to create an extension inside the Drizzle schema. We assume that if you are using postgis types, indexes, and queries, you have a PostgreSQL database with the postgis extension installed.
geometry type from postgis extension:const items = pgTable('items', { geo: geometry('geo', { type: 'point' }), geoObj: geometry('geo_obj', { type: 'point', mode: 'xy' }), geoSrid: geometry('geo_options', { type: 'point', mode: 'xy', srid: 4000 }), });mode Type geometry has 2 modes for mappings from the database: tuple and xy.
- tuple will be accepted for insert and mapped on select to a tuple. So, the database geometry will be typed as [1,2] with drizzle.
- xy will be accepted for insert and mapped on select to an object with x, y coordinates. So, the database geometry will be typed as { x: 1, y: 2 } with drizzle
The current release has a predefined type: point, which is the geometry(Point) type in the PostgreSQL PostGIS extension. You can specify any string there if you want to use some other type
Drizzle Kit updates: [email protected]
Release notes here are partially duplicated from [email protected]
New Features
🎉 Support for new types
Drizzle Kit can now handle:- point and line from PostgreSQL
- vector from the PostgreSQL pg_vector extension
- geometry from the PostgreSQL PostGIS extension
🎉 New param in drizzle.config - extensionsFilters
The PostGIS extension creates a few internal tables in the public schema. This means that if you have a database with the PostGIS extension and use push or introspect, all those tables will be included in diff operations. In this case, you would need to specify tablesFilter, find all tables created by the extension, and list them in this parameter.
We have addressed this issue so that you won’t need to take all these steps. Simply specify extensionsFilters with the name of the extension used, and Drizzle will skip all the necessary tables.
Currently, we only support the postgis option, but we plan to add more extensions if they create tables in the public schema.
The postgis option will skip the geography_columns, geometry_columns, and spatial_ref_sys tablesImprovements
- Update zod schemas for database credentials and write tests to all the positive/negative cases
- support full set of SSL params in kit config, provide types from node:tls connection
- Normilized SQLite urls for libsql and better-sqlite3 drivers
Those drivers have different file path patterns, and Drizzle Kit will accept both and create a proper file path format for each - Updated MySQL and SQLite index-as-expression behavior
In this release MySQL and SQLite will properly map expressions into SQL query. Expressions won’t be escaped in string but columns will be
Bug Fixes
- [BUG]: multiple constraints not added (only the first one is generated) - #2341
- Drizzle Studio: Error: Connection terminated unexpectedly - #435
- Unable to run sqlite migrations local - #432
- error: unknown option ‘—config’ - #423
How push and generate works for indexes
Limitations
You should specify a name for your index manually if you have an index on at least one expression
Exampleindex().on(table.id, table.email) // will work well and name will be autogeneretaed index('my_name').on(table.id, table.email) // will work well // but index().on(sql`lower(${table.email})`) // error index('my_name').on(sql`lower(${table.email})`) // will work wellPush won’t generate statements if these fields(list below) were changed in an existing index:
- expressions inside .on() and .using()
- .where() statements
- operator classes .op() on columns
If you are using push workflows and want to change these fields in the index, you would need to:
- Comment out the index
- Push
- Uncomment the index and change those fields
- Push again
For the generate command, drizzle-kit will be triggered by any changes in the index for any property in the new drizzle indexes API, so there are no limitations here.
Original source - May 1, 2024
- Date parsed from source:May 1, 2024
- First seen by Releasebot:Dec 9, 2025
DrizzleORM v0.30.10 release
DrizzleORM v0.30.10 release
May 1, 2024
New Features
🎉 .if() function added to all WHERE expressions
Select all posts with views greater than 100
async function someFunction(views = 0) { await db.select().from(posts).where(gt(posts.views, views).if(views > 100)); }Bug Fixes
- Fixed internal mappings for sessions.all, .values, .execute functions in AWS DataAPI
Read get started guide with AWS DataAPI in the documentation.
Original source - Apr 22, 2024
- Date parsed from source:Apr 22, 2024
- First seen by Releasebot:Dec 9, 2025
DrizzleORM v0.30.9 release
Drizzle ORM ships new upsert controls for SQLite with setWhere and targetWhere options in onConflictDoUpdate, plus explicit schema info on instances. Also fixes migrator in AWS Data API.
New Features
- Added setWhere and targetWhere fields to .onConflictDoUpdate() config in SQLite instead of single where field:
await db.insert(employees) .values({ employeeId: 123, name: 'John Doe' }) .onConflictDoUpdate({ target: employees.employeeId, targetWhere: sql`name <> 'John Doe'`, set: { name: sql`excluded.name` } });🛠️ Added schema information to Drizzle instances via db._.fullSchema
Added setWhere and targetWhere fields to .onConflictDoUpdate() config in SQLite instead of single where field:
await db.insert(employees) .values({ employeeId: 123, name: 'John Doe' }) .onConflictDoUpdate({ target: employees.employeeId, set: { name: 'John Doe' }, setWhere: sql`name <> 'John Doe'` });Read more about .onConflictDoUpdate() method here.
Fixes
- Fixed migrator in AWS Data API
To get started with Drizzle and AWS Data API follow the documentation.
Original source - Apr 11, 2024
- Date parsed from source:Apr 11, 2024
- First seen by Releasebot:Dec 9, 2025
DrizzleORM v0.30.8 release
DrizzleORM 0.30.8 adds custom Postgres schema support for enums and improves conflict handling across inserts. It fixes onConflictDoUpdate and onConflictDoNothing query generation, patches the AWS Data API driver, and streamlines D1 migrate with batch API.
DrizzleORM v0.30.8 release
Apr 11, 2024
New Features
- Added custom schema support to enums in Postgres (fixes #669 via #2048 )
import { pgSchema } from 'drizzle-orm/pg-core'; const mySchema = pgSchema('mySchema'); const colors = mySchema.enum('colors', ['red', 'green', 'blue']);Learn more about Postgres schemas and enums.
Fixes
Changed D1 migrate() function to use batch API (#2137 )
To get started with Drizzle and D1 follow the documentation.Split where clause in Postgres .onConflictDoUpdate method into setWhere and targetWhere clauses, to support both where cases in on conflict ... clause (fixes #1628 , #1302 via #2056 ).
await db.insert(employees).values({ employeeId : 123 , name : 'John Doe' }).onConflictDoUpdate({ target : employees.employeeId , targetWhere : sql `name <> 'John Doe'` , set : { name : sql `excluded.name` } }); await db.insert(employees).values({ employeeId : 123 , name : 'John Doe' }).onConflictDoUpdate({ target : employees.employeeId , set : { name : 'John Doe' } , setWhere : sql `name <> 'John Doe'` });Learn more about .onConflictDoUpdate method here.
Fixed query generation for where clause in Postgres .onConflictDoNothing method, as it was placed in a wrong spot (fixes #1628 via #2056 ).
Learn more about .onConflictDoNothing method here.Fixed multiple issues with AWS Data API driver (fixes #1931 , #1932 , #1934 , #1936 via #2119 )
Fix inserting and updating array values in AWS Data API (fixes #1912 via #1911 )
To get started with Drizzle and AWS Data API follow the documentation.
Curated by the Releasebot team
Releasebot is an aggregator of official release notes from hundreds of software vendors and thousands of sources.
Our editorial process involves the manual review and audit of release notes procured with the help of automated systems.