Never miss a release that matters
AI-powered summaries of every GitHub release.
AI Summaries
Changelogs condensed into clear, actionable insights.
Always Free
Track up to 5 packages at no cost, forever.
Weekly Digest
A curated summary of every release, delivered weekly.
TL;DR
Drizzle ORM v1.0.0-rc.4 significantly improves SQLite support with optimized query mappers, reworked sessions, and async/sync splitting, alongside codec enhancements for MySQL and PostgreSQL to handle complex data type interactions in set operations (UNIONs).
Breaking
- SQLite RQBv1 Removal: The older query builder (RQBv1) has been removed from SQLite, impacting code relying on its specific APIs.
mapResultRemoval: ThemapResultmethod from thePreparedQueryinterface, and related methods from raw queries in PostgreSQL and SQLite, have been removed.- SQLite Dialect Changes: SQLite dialects have been split into async and effect versions, and generic migrators have moved locations.
New
- Improved SQLite Performance: Optimized default query mappers and a reworked session system enhance SQLite query performance.
- MySQL & PostgreSQL Codec Improvements: Enhanced codec system for set operators (UNIONs) improves type handling and compatibility across database types.
- WASM Migrator: Added a filesystem-less migrator for
@tursodatabase/database-wasmallowing migrations in WASM environments.
Fixes Worth Knowing
- SQLite
db.$count: Thedb.$countbuilder now includes.sync()for sync drivers. bun-sql/pgFix: Resolved an issue withdb.selectin thebun-sql/pgdriver.sql.paramFix: Correctly passes the value of aPlaceholderto encoder functions.- SQLite
blobFix: Resolved a runtime-type mismatch forblobcolumns in SQLite. - Nested Transactions: Added support for nested transactions in
@tursodatabase/databaseand@tursodatabase/database-wasm.
Before You Upgrade
- Review SQLite Queries: If you're using SQLite, review your code for any dependencies on the removed RQBv1 APIs.
- Update Effect Package: Ensure your project uses
effectpackage version 4.0.0-beta.83 or later.
TL;DR
Drizzle ORM now correctly escapes identifiers and aliases, resolving a potential SQL injection vulnerability.
Fixes Worth Knowing
Fixed a critical security vulnerability where database identifiers and aliases weren’t properly escaped, potentially allowing SQL injection attacks.
Before You Upgrade
Review your queries and ensure you are using the latest version of Drizzle to benefit from this security fix.
TL;DR
Drizzle ORM now correctly handles custom migration table names and schemas, resolving issues with drizzle-kit push and ensuring migrations work as expected with non-default configurations.
Fixes Worth Knowing
drizzle-kit pushnow respects custom migration schemas and table names defined indrizzle.config.- Fixed a
TypeErrorwhenfindFirstreturns no results. - Corrected issues with foreign key constraint generation for MSSQL (Microsoft SQL Server).
- Improved
drizzle-kit pullto generate valid SQL syntax.
TL;DR
Drizzle ORM now supports advanced PostgreSQL, MySQL, and SQLite features like sequences, identity columns, and generated columns, significantly expanding schema definition capabilities and improving compatibility with database best practices.
New
- Generated Columns: Define columns whose values are computed from other columns (PostgreSQL, MySQL, SQLite).
- PostgreSQL Sequences & Identity Columns: Use modern sequence management instead of the deprecated
serialtype. - Drizzle Kit Enhancements: Migrations now support the new ORM features, and a
--forceflag allows auto-acceptance of data-loss statements duringpush. Migration file prefixes are now customizable.
Fixes Worth Knowing
None.
Before You Upgrade
If using MySQL or SQLite generated columns, be aware of limitations with the drizzle-kit push and generate commands, particularly around modifying stored generated expressions. Review the release notes for specific details.