drizzle-orm
0.45.4 · 8 Oct 2026Apache-2.049.6M / weekRepositoryHomepagenpmAtom feed
0.45.4 is the newest release of 0.38.x.
In short
16 breaking6 new25 fixed8 changed
- Breaking
MySqlCharBuilderInitial - Breaking
MySqlVarCharBuilderInitial - Breaking
PgCharBuilderInitial - Breaking
PgArrayBuilder - Breaking
PgArray - Breaking
PgVarcharBuilderInitial - Breaking
PgBinaryVectorBuilderInitial - Breaking
PgBinaryVectorBuilder
Security
1 advisory affects 0.38.0; 0.45.2 fixes them
- HighDrizzle ORM has SQL injection via improperly escaped SQL identifiersGHSA-gpj5-g38j-94v9 · 8 Apr 2026Fixed in 0.45.2
Release note
Types breaking changes
A few internal types were changed and extra generic types for length of column types were added in this release. It won't affect anyone, unless you are using those internal types for some custom wrappers, logic, etc. Here is a list of all types that were changed, so if you are relying on those, please review them before upgrading
- Breaking
MySqlCharBuilderInitial - Breaking
MySqlVarCharBuilderInitial - Breaking
PgCharBuilderInitial - Breaking
PgArrayBuilder - Breaking
PgArray - Breaking
PgVarcharBuilderInitial - Breaking
PgBinaryVectorBuilderInitial - Breaking
PgBinaryVectorBuilder - Breaking
PgBinaryVector - Breaking
PgHalfVectorBuilderInitial - Breaking
PgHalfVectorBuilder - Breaking
PgHalfVector - Breaking
PgVectorBuilderInitial - Breaking
PgVectorBuilder - Breaking
PgVector - Breaking
SQLiteTextBuilderInitial
New Features
Added new function
getViewSelectedFieldsAdded
$inferSelectfunction to viewsAdded
InferSelectViewModeltype for viewsAdded
isViewfunction
Validator packages updates
drizzle-zodhas been completely rewritten. You can find detailed information about it heredrizzle-valibothas been completely rewritten. You can find detailed information about it heredrizzle-typeboxhas been completely rewritten. You can find detailed information about it hereOutput for all packages are now unminified, makes exploring the compiled code easier when published to npm.
Smaller footprint. Previously, we imported the column types at runtime for each dialect, meaning that for example, if you're just using Postgres then you'd likely only have drizzle-orm and drizzle-orm/pg-core in the build output of your app; however, these packages imported all dialects which could lead to mysql-core and sqlite-core being bundled as well even if they're unused in your app. This is now fixed.
Slight performance gain. To determine the column data type we used the is function which performs a few checks to ensure the column data type matches. This was slow, as these checks would pile up every quickly when comparing all data types for many fields in a table/view. The easier and faster alternative is to simply go off of the column's columnType property.
Some changes had to be made at the type level in the ORM package for better compatibility with drizzle-valibot.
And a set of new features
createSelectSchemafunction now also accepts views and enums.New function:
createUpdateSchema, for use in updating queries.New function:
createSchemaFactory, to provide more advanced options and to avoid bloating the parameters of the other schema functions
Bug fixes
[FEATURE]: Export factory functions from drizzle-zod to allow usage with extended Zod classes
[FEATURE]: Add support for new pipe syntax for drizzle-valibot
[BUG]: drizzle-zod's createInsertSchema() can't handle column of type vector
[BUG]: drizzle-typebox fails to map geometry column to type-box schema
[BUG]: drizzle-valibot does not provide types for returned schemas
[BUG]: drizzle-zod: documented usage generates type error with exactOptionalPropertyTypes
[BUG]: drizzle-zod Type generation results in undefined types
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.