Drizzle ORM and Drizzle Kit v1.0.0-rc.4 release
Drizzle ORM
- Fixed broken
Viewtypes when usingSubqueryin selection - Fixed custom types’ JSON field API not being applied when column is used as a decoder on
SQLfields - Fixed codecs not getting applied to
SQLfield when.mapWith(column)is set (fixes #5724) - Fixed
Subqueryfields’ columns’ codecs not being applied to subquery - Fixed broken in
rc.3db.selectinbun-sql/pgdriver (fixes #5779) - Updated SQLite
db.$countbuilder to include.sync()executor for sync drivers - Removed RQBv1 from
sqlite, removed RQBv1TSchema,TFullSchemaarguments fromsqliteentities’ generics - Fixed instances of
sqlitequery errors not being wrapped inDrizzleQueryError(db.batch()excluded due to api incompatibility) - Fixed type error on
CockroachArrayBuilderconstructor caused by referencing internal field’s type - Removed
mapResultmethod fromPreparedQueryinterface, removedmapResult,mapBatchResultfrompgandsqliteraw queries - Fixed wrong
bun-sqliterun result type - Switched
sqliteRQBv2 to array mode - Enabled optimized default query mappers for
sqlite - Reworked
sqlitesessions: replaced per-driverPreparedQueryinstances with executors passed via sessions, similar to currentpostgresqlandmysqlimplementations, moveduseJitMappersflag handling to dialect - Fixed missing
stringoverload on.comment(sqlCommenterComment)in query builders - Supported nested transactions in
@tursodatabase/database,@tursodatabase/database-wasm - Added filesystem-free migrator for
@tursodatabase/database-wasmatdrizzle-orm/tursodatabase/wasm-migrator - Split SQLite into
async,effectversions (syncremains subtype ofasync) - Removed
SQLiteSyncDialect,SQLiteAsyncDialect, moved generic SQLiteasync\syncmigrators tosqlite-core/async/sessionasmigrateSync,migrateAsync - Fixed
sqlitecache using same cache entry for different execute methods - Moved
EffectDrizzlePgConfigtodrizzle-orm/pg-core/effect/utils - Made
cachefield inEffectCacheShapeoptional - Split
mysqlintoasync,effectversions - Added codec system to
mysql - Fixed
mysqlfloatrounding to either 6 digits or double - Fixed
mysqlcropping.000fromtimestamp(3) - Moved subquery mapper selection from
dialect.buildSelectiontoorderSelectedFields; - [
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]toSELECT ... 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
effectpackage versions to4.0.0-beta.83 - Fixed
sql.parampassingPlaceholderas expected input value to encoder function instead ofPlaceholder’s value type - Fixed unguarded
Bufferreference indrizzle-orm/effect-schemathat caused error in environments withoutBuffer - Fixed
sqliteblobcolumn runtime-type default mode mismatch (fixes #1064) - Improved typed
sqloperator - preserved nullability, inferred initial data type tomapWithcallback 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
generatedByDefaultAsIdentitycolumns not being filtered from inserts in runtime inpostgresdialect - 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-wasmto v0.6.0, updated session internals for asynchronous prepare on driver side - Added
@tursodatabase/serverlessdriver support - Added
@tursodatabase/syncdriver support - Added
@effect/sql-pglitedriver support - Added
@effect/sql-sqlite-nodedriver support - Added
@effect/sql-sqlite-bundriver support - Added
@effect/sql-sqlite-dodriver support - Added
@effect/sql-sqlite-wasmdriver support - Added
@effect/sql-libsqldriver support - Added
@effect/sql-d1driver support - Added
@effect/sql-mysql2driver support - Fixed
@effect/sql-pgdriver returning object response instead of raw response ondb.execute pg-proxy: added dialect config to optional dialect creator callback
Drizzle Kit
-
Fixed postgres pull from failing for non-admin roles (fixes #5568)
Machine-readable output & programmatic SDK
- Added an
--output text|jsonmode togenerate,push,pull,up,export, andcheck. Injsonmode 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/clisubpath exposinggenerate(),push(),pull(),up(),exportSql(), andcheck()with typed options and results matching the CLI JSON contract (see SDK.md) - Auto-detected non-interactive mode (
--output json, or--output textwith a non-TTY stdin) no longer renders interactive prompts. Instead, unresolved renames and destructive changes (confirm_data_loss) are surfaced as amissing_hintsenvelope (or a missing-decisions report undertext) and resolved by supplying a structuredhintsarray 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, anddrizzle-responses-and-errors(seedrizzle-kit/skillsfolder)