Change8

0.42.0

📦 drizzle-orm
4 features🐛 1 fixes🔧 5 symbols

Summary

This release introduces first-class support for TypeScript native enums in PostgreSQL and MySQL, and resolves critical export duplication issues that caused SyntaxErrors in certain environments.

Migration Steps

  1. If you were using string unions for enums, no changes are required. To use the new functionality, replace string union arrays in pgEnum or mysqlEnum with TypeScript enum objects.

✨ New Features

  • Added support for TypeScript native enums in pgEnum and mysqlEnum, allowing for direct insertion and retrieval of enum values with full type inference.
  • Added InferEnum type for better type extraction from enum definitions.
  • Updated inArray to accept ReadonlyArray as a valid input value.
  • Enhanced @planetscale/database integration by passing the row type parameter to the execute function.

🐛 Bug Fixes

  • Removed duplicated exports in drizzle-orm that caused SyntaxError (e.g., 'does not provide an export named eq/lte') when using custom loaders.

🔧 Affected Symbols

pgEnummysqlEnuminArrayInferEnumdrizzle-orm