NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #4298 most downloaded on npm
Drizzle ORM package for SQL databases
Last release 13 days ago
21 Sep 2026
Ships fairly regularly
a new release about every 2 weeks
Nearly every release is documented
notes for 60 of the last 60 stable releases
291 versions withdrawn
withdrawn after publishing
5 years old
564 releases · first in 2021
One column per quarter.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Fixed broken View types when using Subquery in selection
View types when using Subquery in selectionSQL fieldsSQL field when .mapWith(column) is set (fixes #5724)Subquery fields' columns' codecs not being applied to subqueryrc.3 db.select in bun-sql/pg driver (fixes #5779)db.$count builder to include .sync() executor for sync driverssqlite, removed RQBv1 TSchema, TFullSchema arguments from sqlite entities' genericssqlite query errors not being wrapped in DrizzleQueryError (db.batch() excluded due to api incompatibility)CockroachArrayBuilder constructor caused by referencing internal field's typemapResult method from PreparedQuery interface, removed mapResult, mapBatchResult from pg and sqlite raw queriesbun-sqlite run result typesqlite RQBv2 to array modesqlitesqlite sessions: replaced per-driver PreparedQuery instances with executors passed via sessions, similar to current postgresql and mysql implementations, moved useJitMappers flag handling to dialectstring overload on .comment(sqlCommenterComment) in query builders@tursodatabase/database, @tursodatabase/database-wasm@tursodatabase/database-wasm at drizzle-orm/tursodatbase/wasm-migratorasync, effect versions (sync remains subtype of async)SQLiteSyncDialect, SQLiteAsyncDialect, moved generic SQLite async\sync migrators to sqlite-core/async/session as migrateSync, migrateAsyncsqlite cache using same cache entry for different execute methodsEffectDrizzlePgConfig to drizzle-orm/pg-core/effect/utilscache field in EffectCacheShape optionalmysql into async, effect versionsmysqlmysql float rounding to either 6 digits or doublemysql cropping .000 from timestamp(3)dialect.buildSelection to orderSelectedFields;PG, MySQL] Improved codec system in set operators:
[QUERY 1] UNION [QUERY 2] to SELECT ... FROM ([QUERY 1] UNION [QUERY 2]) "drizzle_union" so cast codecs would apply after union's type mutationeffect package versions to 4.0.0-beta.83sql.param passing Placeholder as expected input value to encoder function instead of Placeholder's value typeBuffer reference in drizzle-orm/effect-schema that caused error in environments without Buffersqlite blob column runtime-type default mode mismatch (fixes #1064)sql operator - preserved nullability, inferred initial data type to mapWithcallback 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 | nullgeneratedByDefaultAsIdentity columns not being filtered from inserts in runtime in postgres dialectdb.insert(table).select(...): removed column order match requirement, allowed skipping selection for columns with defaults or nullability (fixes #3608)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
Fixed postgres pull from failing for non-admin roles (fixes #5568)
--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)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)--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)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)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)Porting all the changes that were made in PostgreSQL to other dialects. This release is about MySQL:
Porting all the changes that were made in PostgreSQL to other dialects. This release is about MySQL:
mysql dialect (._query)lastInsertId, affectedRows from dedicated response fieldsNext releases will include:
Disabled default codec type selectors for custom columns (fixes #5711 )
codec: (config) => config?.withTimeZone ? 'timestamptz' : 'timestamp')geometry -> geometry(point), geometry:tuple -> geometry(point):tupleAWS Data Api codecs, removed query typings, improved input param mappingtypings field from all builderscolumn argument to CastParam,CastArrayParam codecsdrizzle-kit generate now checks whether those branches can be merged safely before creating the next migration. This helps catch cases where two migrations were created from the same parent and then changed the same SQLite object in incompatible ways, for example two branches changing the same table, index, or view.npx drizzle-kit generate--ignore-conflicts to skip the conflict check for that command.npx drizzle-kit generate --ignore-conflicts
npx drizzle-kit check --ignore-conflicts{
"prevIds": ["first-open-leaf-id", "second-open-leaf-id"]
}DrizzleQueryError and TransactionRollbackError constructors to properly set the error name for better instanceof checks⚠️ This release introduced a breaking change into our casing API( see below ) and removes RQB v1 ._query for postgres
⚠️ This release introduced a breaking change into our casing API(see below) and removes RQB v1 ._query for postgres
Drizzle ORM now has an opt-in API for JIT(just in time compilated) mappers which make most expensive part of the db request pipeline(row mapping) as fast as humanly possible.
const db = drizzle({ ..., jit: true })
const query = db.select().from(users).prepare();
// ^ here drizzle generates a jit mapper which will then be reused during each invocation
server.get('users', (c) => {
const users = await query.execute(); // as fast as using raw driver
return c.json(users)
})We've reworked internals of Drizzle ORM with the new system of codecs. Those are now in charge of normalising responses and requests for diffrent drivers across pg dialect. They helped us not only properly fix a set of data mapping issues but also massively improve performance by not doing unnecessary work.
We've seen a 25%-30% reduction in latency, while +800rps(14500->15300) in our benchmarks
Give it a go and let us know if everything works just fine!
drizzle-orm@1.0.0-rc.1 comes with native support for Effect v4 via:
import { PgClient } from '@effect/sql-pg';
import * as PgDrizzle from 'drizzle-orm/effect-postgres';
import * as Effect from 'effect/Effect';
import * as Redacted from 'effect/Redacted';
import { relations } from '../relations';
const connectionStr = Redacted.make(process.env['PG_CONNECTION_STRING']!);
const PgClientLive = PgClient.layer({
url: connectionStr,
});
const DB = PgDrizzle.make({ relations }).pipe(Effect.provide(PgDrizzle.DefaultServices));
const program = Effect.gen(function*() {
const db = yield* DB;
const users = yield* db.select().from(usersTable);
}).pipe(Effect.provide(PgClientLive));
await Effect.runPromise(program);⚠️ BREAKING CHANGE
In rc.1 we've finally reworked our legacy casing API of const db = drizzle({..., casing: "camel" }) which turned out to not be a proper solution, it required duplication in drizzle-orm instantiation and drizzle-kit config and introduced and set of endless bugs all around query builder chain. All of the above is now fixed with new API:
import * as d from "drizzle-orm/pg-core";
const users = d.snakeCase.table("users", {
id: d.serial().primaryKey(),
email: d.text().unique(),
fullName: d.text(), // full_name in db
createdAt: d.timestamp().defaultNow(), // created_at in db
})
// --- for namespaces/schemas you can use
const schema2 = d.camelCase.schema("schema2");
const usersInSchema2 = schema2.table("users", ...);
const ordersInSchema2 = schema2.table("orders", ...);
// ^ all entities in schema2 will be snake_cased
// --- all available entities
import { snakeCase, camelCase } from "drizzle-orm/pg-core";
snakeCase.view
snakeCase.materializedView
snakeCase.schema
snakeCase.table
camelCase.view
camelCase.materializedView
camelCase.schema
camelCase.tableNote: The Netlify Database driver is developed and maintained by the Netlify team.
Installation:
npm install @netlify/databaseUsage example:
import { drizzle } from 'drizzle-orm/netlify-db';
const db = drizzle();
const result = await db.execute('select 1');import { drizzle } from 'drizzle-orm/netlify-db';
const db = drizzle(process.env.DATABASE_URL);
const result = await db.execute('select 1');import { drizzle } from 'drizzle-orm/netlify-db';
// Explicit client — consumer controls the driver
const db = drizzle({ client: netlifyDbClient });
const result = await db.execute('select 1');postgres - resolves issues created by differences of data types returned by different drivers or different contexts of query (regular select, JSON object, postgres array). Currently only handles supported by drizzle constructors column types. (fixes #3018, #5090, #5287)postgresdb._query) from postgresmakePgArray, parsePgArray) from drizzle-orm/pg-core/utils[/array] to drizzle-orm/pg-core/arraypostgres sessions & prepared queriesneon-http bytea data corruptionbun-sql/postgres timestamp timezone truncation, json[b] data double stringificationdb instance to table \ view \ schema via import { snakeCase, camelCase } from "drizzle-orm/dialect-core", fixed #5112 #5282 #4181 #4209effect-schema, effect-postgres (fixes #5414)Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →