Change8

0.41.0

Breaking Changes
📦 drizzle-ormView on GitHub →
2 breaking2 features🐛 7 fixes🔧 10 symbols

Summary

This release introduces bigint/number modes for decimal types and refactors sql-js query preparation. It includes several data type mismatch fixes for MySQL and Postgres, and resolves issues with AWS Data API and RQBv1.

⚠️ Breaking Changes

  • Changed sql-js behavior to use query prebuild instead of database-side prepare. The .free() method has been removed and is no longer needed to manage memory for prepared queries.
  • Removed internal mapping for specific Postgres array types (numeric[], timestamp[], timestamp_with_timezone[], interval[], date[]) to prevent precision loss, which may change how these types are returned.

Migration Steps

  1. Remove any calls to the .free() method when using sql-js.
  2. Ensure length is specified for varchar columns in MySQL and SingleStore configurations.
  3. Verify handling of Postgres array types (numeric, timestamp, interval, date) as internal driver mapping has been removed.

✨ New Features

  • Added 'bigint' and 'number' modes for decimal and numeric column types across SQLite, MySQL, PostgreSQL, and SingleStore.
  • Enabled 'supportBigNumbers' by default in auto-created mysql2 driver instances.

🐛 Bug Fixes

  • Fixed MySQL and SingleStore varchar columns allowing missing length in configuration.
  • Fixed data/type mismatches for binary and varbinary types in MySQL and SingleStore.
  • Fixed numeric/decimal data/type mismatches (Issues #1290, #1453).
  • Fixed drizzle-studio connection issues with AWS Data API (Issue #3224).
  • Fixed isConfig utility function checking incorrect fields.
  • Fixed custom schema table querying in Relational Query Builder v1 (Issue #4060).
  • Fixed SQLite buffer-mode blob columns occasionally returning number arrays instead of buffers.

🔧 Affected Symbols

sql-js.free()decimalnumericvarcharbinaryvarbinaryisConfigRQBv1blob