Drizzle ORM
Backend & InfraORM
Release History
View all versions →v1.0.0-rc.4Breaking17 fixes16 featuresThis release introduces significant architectural changes, particularly splitting SQLite and MySQL into async/effect variants, and overhauling result mapping APIs. Numerous fixes address issues across PostgreSQL, SQLite, and MySQL dialects, alongside improved SQL operator typing.
v1.0.0-rc.3Breaking2 fixes3 featuresThis release ports PostgreSQL changes to the MySQL dialect, including RQBv1 removal, internal session refactoring, and enabling optimized mappers. It also fixes issues with MySQL proxy driver response handling.
v1.0.0-rc.2Breaking3 fixes3 featuresThis release introduces significant improvements to SQLite migration handling, including conflict detection and better tree merging, alongside fixes for custom column codecs and PG transaction implementation details.
v1.0.0-rc.1Breaking3 fixes5 featuresVersion 1.0.0-rc.1 introduces major performance enhancements via JIT mappers and a new codec system, alongside native Effect v4 support and a new Netlify driver. This release also contains breaking changes by removing the legacy casing API and RQB v1 postgres support.
v1.0.0-beta.229 fixesThis release focuses heavily on bug fixes, particularly around drizzle-kit generation, migration failures across various databases (Windows, Cloudflare D1, MSSQL), and improved commutativity checks for schema changes.
v1.0.0-beta.212 fixesThis release focuses on further stabilizing the drizzle-kit migration process by correcting commutativity checks related to PostgreSQL enum value additions.
v1.0.0-beta.201 fixThis release addresses a critical security vulnerability by fixing improper SQL escaping in identifier and aliasing functions. Thanks to community contributions for identifying and helping resolve the issue.
0.45.21 fixThis release addresses a critical security vulnerability by fixing improper SQL escaping in identifier and aliasing functions. Thanks to community contributions for identifying and helping resolve the issue.
v1.0.0-beta.1910 fixes2 featuresThis release introduces `sqlcommenter` support for PostgreSQL and MySQL, enabling query tagging, and includes numerous bug fixes across `drizzle-kit` operations like push, pull, and generate. Schema file processing has also been restricted to specific file extensions.
v1.0.0-beta.184 fixes1 featureThis release introduces support for the `node:sqlite` driver for migrations and Studio browsing, alongside several fixes related to tsconfig path aliases and module resolution in drizzle-kit.
drizzle-kit@0.31.102 featuresThis release updates the underlying module loader from `esbuild-register` to `tsx` for better ESM/CJS compatibility and introduces native launch support for Bun and Deno environments.
v1.0.0-beta.171 fix2 featuresThis release introduces a new `node-sqlite` driver for Drizzle ORM and enhances migration upgrade robustness by adding validation checks for the migrations table.
v1.0.0-beta.161 fix5 featuresThis beta release overhauls the Drizzle ORM migration infrastructure, fixing a critical regression related to timestamp precision during format conversion. It introduces migration table versioning and new commutativity checks via `drizzle-kit check` for improved team workflows.
drizzle-kit@0.31.9v1.0.0-beta.151 fix3 featuresThis release consolidates all validator packages into the main `drizzle-orm` package, simplifying dependency management. A new integration with Effect Schema is also introduced, alongside a bug fix for SQLite ordering/grouping.
v1.0.0-beta.14Breaking9 fixes1 featureThis release updates the migrator to apply all missing database changes and includes numerous bug fixes across SQL generation, introspection, and driver transactions. A key change restricts async function usage within sync driver transactions.
v1.0.0-beta.13Breaking2 fixes3 featuresDrizzle Kit now supports top-level await in configuration and schema files, resolving module import errors. The Effect Postgres integration received major API updates to better align with Effect patterns, including configurable logging and caching layers.
v1.0.0-beta.12Breaking11 fixes2 featuresThis release introduces detailed schema error reporting for PostgreSQL and SQLite dialects during schema generation and push operations. It also resolves several critical bugs related to crypto module resolution, SQL generation, and configuration handling.
v1.0.0-beta.11Breaking10 fixes2 featuresThis release standardizes timezone handling for PostgreSQL timestamps and significantly improves the stability and correctness of `drizzle-kit` introspection and schema generation, especially for MySQL and complex indexing scenarios. Caching behavior in Pg has also been made explicit.
v1.0.0-beta.9Breaking1 fix6 featuresThis release introduces native Effect SQL driver support and significant type system improvements for PostgreSQL columns. It also updates the `drizzle-kit` loader to `tsx` and switches the default MySQL2 client pool.
v1.0.0-beta.8Breaking4 fixes5 featuresThis release of drizzle-seed introduces column ignoring in refinements, min/max constraints for date/time generators, and automatic Postgres sequence syncing. It also upgrades the default UUID generator to v4 to fix Zod validation errors.
v.1.0.0-beta.76 fixes1 featureThis release focuses on bug fixes for drizzle-kit, specifically improving schema/table recognition in the push/pull commands and fixing a TypeError in findFirst.
v1.0.0-beta.66 fixesThis release focuses on bug fixes for drizzle-kit, specifically addressing false positive change detections in schema pushing, JSON key ordering, and Cloudflare D1 compatibility.
v1.0.0-beta.5Breaking5 fixes2 featuresThis release fixes several critical bugs across PostgreSQL, MSSQL, and MySQL, while introducing significant changes to how SQLite unique constraints and foreign keys are handled in drizzle-kit.
v1.0.0-beta.43 fixesThis release focuses on critical bug fixes for drizzle-kit and the migrator, resolving issues with migration ordering on Linux and silent failures during code generation.
Common Errors
DrizzleQueryError8 reportsDrizzleQueryError often stems from discrepancies between your Drizzle schema and the actual database schema, or issues within the query construction itself. Ensure your Drizzle schema accurately reflects your database tables and column types, and thoroughly review your raw SQL queries or Drizzle queries for syntax errors or incorrect parameter usage that could lead to database engine rejection. Consider upgrading drizzle-orm to the latest version or downgrading to a stable version before the introduction of breaking changes in the driver or query compiler.
FunctionCallException1 reportFunctionCallException in drizzle-orm often arises from incorrect `generatedAlwaysAs` usage or incompatibilities between your schema definition and database constraints, especially with SQLite and Expo SQLite. Ensure that the `generatedAlwaysAs` value matches your database column's generation expression precisely, and that the generation expression is valid SQL for your target database dialect. Review your migration files and schema definitions, paying close attention to any expressions used with `generatedAlwaysAs` for potential syntax errors or inconsistencies.
DrizzleTypeError1 reportDrizzleTypeError often arises from a mismatch between the generic type defined for your table schema (e.g., `PgTableWithColumns<T>`) and the type expected by Drizzle's methods like `select().from()`. Ensure the generic type `T` accurately reflects the column schema of your table, or explicitly cast the table to `AnyTable` when passing it to `from()` if the exact type isn't crucial for the operation. Update Drizzle ORM if this is indeed a bug in the type definitions themselves.
NotFoundException1 reportNotFoundException in Drizzle ORM usually arises when querying for a single record using `.get()` or similar methods, but no matching record exists in the database based on the provided criteria. To fix this, either ensure your query criteria are correct and a record should exist, or use `.findFirst()`/`.findMany()` with `.limit(1)` and handle the potential absence of a result by checking if the returned array is empty. You can also use `.findFirst()` directly and handle null return.
BadRequestException1 reportBadRequestException in drizzle-orm often arises from type mismatches between your schema definition and the data you're trying to insert or query, especially when using drizzle-zod. Ensure your Zod schemas accurately reflect your database schema and that the types passed during operations like `db.insert(table).values(data)` align with these defined schemas. Carefully check the inferred types and adjust your Zod schemas or data transformations to eliminate type discrepancies that triggers the validation error.
Related Backend & Infra Packages
Production-Grade Container Scheduling and Management
Node.js JavaScript runtime ✨🐢🚀✨
Promise based HTTP client for the browser and node.js
A modern runtime for JavaScript and TypeScript.
Deliver web apps with confidence 🚀
Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
Subscribe to Updates
Get notified when new versions are released