Repository navigation
Fix $onUpdate not handling sql values - #2911
Closed
L-Mario564 wants to merge 11 commits into
Closed
L-Mario564 wants to merge 11 commits into
L-Mario564 wants to merge 11 commits into
Conversation
1 task done
|
This change seems to change every type's toDriver()/mapToDriver() to check for SQL values. As per #3730 it looks to me like adding the check to |
Collaborator
|
|
This was referenced Mar 23, 2026
This was referenced Apr 14, 2026
8 tasks
5 tasks done
This was referenced Aug 1, 2026
This was referenced Aug 9, 2026
Merged
renovate Bot
added a commit
to cigaleapp/beamup
that referenced
this pull request
Sep 21, 2026
##### [v0.45.2](https://github.com/drizzle-team/drizzle-orm/releases/tag/0.45.2) - Fixed `sql.identifier()`, `sql.as()` escaping issues. Previously all the values passed to this functions were not properly escaped causing a possible SQL Injection (CWE-89) vulnerability Thanks to [@EthanKim88](https://github.com/EthanKim88), [@0x90sh](https://github.com/0x90sh) and [@wgoodall01](https://github.com/wgoodall01) for reaching out to us with a reproduction and suggested fix ##### [v0.45.1](https://github.com/drizzle-team/drizzle-orm/releases/tag/0.45.1) - Fixed pg-native Pool detection in node-postgres transactions breaking in environments with forbidden `require()` ([#5107](drizzle-team/drizzle-orm#5107)) ##### [v0.45.0](https://github.com/drizzle-team/drizzle-orm/releases/tag/0.45.0) - Fixed pg-native Pool detection in node-postgres transactions - Allowed subqueries in select fields - Updated typo algorythm => algorithm - Fixed `$onUpdate` not handling `SQL` values (fixes [#2388](drizzle-team/drizzle-orm#2388), tests implemented by [L-Mario564](https://github.com/L-Mario564) in [#2911](drizzle-team/drizzle-orm#2911)) - Fixed `pg` mappers not handling `Date` instances in `bun-sql:postgresql` driver responses for `date`, `timestamp` types (fixes [#4493](drizzle-team/drizzle-orm#4493)) ##### [v0.44.7](https://github.com/drizzle-team/drizzle-orm/releases/tag/0.44.7) - fix durable sqlite transaction return value [#3746](drizzle-team/drizzle-orm#3746) - thanks [@joaocstro](https://github.com/joaocstro) ##### [v0.44.6](https://github.com/drizzle-team/drizzle-orm/releases/tag/0.44.6) - feat: add $replicas reference [#4874](drizzle-team/drizzle-orm#4874)
renovate Bot
added a commit
to cigaleapp/beamup
that referenced
this pull request
Sep 28, 2026
##### [v0.45.3](https://github.com/drizzle-team/drizzle-orm/releases/tag/0.45.3) #### New Netlify DB Driver > Note: The Netlify DB driver is developed and maintained by the Netlify team. **Installation:** ```bash npm i @netlify/db ``` **Usage example:** ```typescript import { drizzle } from 'drizzle-orm/netlify-db'; // reads NETLIFY_DB_URL and NETLIFY_DB_DRIVER env vars const db = drizzle(); const result = await db.execute('select 1'); ``` ```typescript import { drizzle } from 'drizzle-orm/netlify-db'; const db = drizzle(process.env.DATABASE_URL); const result = await db.execute('select 1'); ``` ```typescript import { drizzle } from 'drizzle-orm/netlify-db'; // Explicit client — consumer controls the driver const db = drizzle({ client: netlifyDbClient }); const result = await db.execute('select 1'); ``` ##### [v0.45.2](https://github.com/drizzle-team/drizzle-orm/releases/tag/0.45.2) - Fixed `sql.identifier()`, `sql.as()` escaping issues. Previously all the values passed to this functions were not properly escaped causing a possible SQL Injection (CWE-89) vulnerability Thanks to [@EthanKim88](https://github.com/EthanKim88), [@0x90sh](https://github.com/0x90sh) and [@wgoodall01](https://github.com/wgoodall01) for reaching out to us with a reproduction and suggested fix ##### [v0.45.1](https://github.com/drizzle-team/drizzle-orm/releases/tag/0.45.1) - Fixed pg-native Pool detection in node-postgres transactions breaking in environments with forbidden `require()` ([#5107](drizzle-team/drizzle-orm#5107)) ##### [v0.45.0](https://github.com/drizzle-team/drizzle-orm/releases/tag/0.45.0) - Fixed pg-native Pool detection in node-postgres transactions - Allowed subqueries in select fields - Updated typo algorythm => algorithm - Fixed `$onUpdate` not handling `SQL` values (fixes [#2388](drizzle-team/drizzle-orm#2388), tests implemented by [L-Mario564](https://github.com/L-Mario564) in [#2911](drizzle-team/drizzle-orm#2911)) - Fixed `pg` mappers not handling `Date` instances in `bun-sql:postgresql` driver responses for `date`, `timestamp` types (fixes [#4493](drizzle-team/drizzle-orm#4493)) ##### [v0.44.7](https://github.com/drizzle-team/drizzle-orm/releases/tag/0.44.7) - fix durable sqlite transaction return value [#3746](drizzle-team/drizzle-orm#3746) - thanks [@joaocstro](https://github.com/joaocstro) ##### [v0.44.6](https://github.com/drizzle-team/drizzle-orm/releases/tag/0.44.6) - feat: add $replicas reference [#4874](drizzle-team/drizzle-orm#4874)
renovate Bot
added a commit
to cigaleapp/beamup
that referenced
this pull request
Oct 15, 2026
##### [v0.45.4](https://github.com/drizzle-team/drizzle-orm/releases/tag/0.45.4) - Fixed `postgres-js` not using prepared queries on explicit `.prepare(name)` ##### [v0.45.3](https://github.com/drizzle-team/drizzle-orm/releases/tag/0.45.3) #### New Netlify DB Driver > Note: The Netlify DB driver is developed and maintained by the Netlify team. **Installation:** ```bash npm i @netlify/db ``` **Usage example:** ```typescript import { drizzle } from 'drizzle-orm/netlify-db'; // reads NETLIFY_DB_URL and NETLIFY_DB_DRIVER env vars const db = drizzle(); const result = await db.execute('select 1'); ``` ```typescript import { drizzle } from 'drizzle-orm/netlify-db'; const db = drizzle(process.env.DATABASE_URL); const result = await db.execute('select 1'); ``` ```typescript import { drizzle } from 'drizzle-orm/netlify-db'; // Explicit client — consumer controls the driver const db = drizzle({ client: netlifyDbClient }); const result = await db.execute('select 1'); ``` ##### [v0.45.2](https://github.com/drizzle-team/drizzle-orm/releases/tag/0.45.2) - Fixed `sql.identifier()`, `sql.as()` escaping issues. Previously all the values passed to this functions were not properly escaped causing a possible SQL Injection (CWE-89) vulnerability Thanks to [@EthanKim88](https://github.com/EthanKim88), [@0x90sh](https://github.com/0x90sh) and [@wgoodall01](https://github.com/wgoodall01) for reaching out to us with a reproduction and suggested fix ##### [v0.45.1](https://github.com/drizzle-team/drizzle-orm/releases/tag/0.45.1) - Fixed pg-native Pool detection in node-postgres transactions breaking in environments with forbidden `require()` ([#5107](drizzle-team/drizzle-orm#5107)) ##### [v0.45.0](https://github.com/drizzle-team/drizzle-orm/releases/tag/0.45.0) - Fixed pg-native Pool detection in node-postgres transactions - Allowed subqueries in select fields - Updated typo algorythm => algorithm - Fixed `$onUpdate` not handling `SQL` values (fixes [#2388](drizzle-team/drizzle-orm#2388), tests implemented by [L-Mario564](https://github.com/L-Mario564) in [#2911](drizzle-team/drizzle-orm#2911)) - Fixed `pg` mappers not handling `Date` instances in `bun-sql:postgresql` driver responses for `date`, `timestamp` types (fixes [#4493](drizzle-team/drizzle-orm#4493)) ##### [v0.44.7](https://github.com/drizzle-team/drizzle-orm/releases/tag/0.44.7) - fix durable sqlite transaction return value [#3746](drizzle-team/drizzle-orm#3746) - thanks [@joaocstro](https://github.com/joaocstro) ##### [v0.44.6](https://github.com/drizzle-team/drizzle-orm/releases/tag/0.44.6) - feat: add $replicas reference [#4874](drizzle-team/drizzle-orm#4874)
renovate Bot
added a commit
to cigaleapp/beamup
that referenced
this pull request
Oct 16, 2026
##### [v0.45.4](https://github.com/drizzle-team/drizzle-orm/releases/tag/0.45.4) - Fixed `postgres-js` not using prepared queries on explicit `.prepare(name)` ##### [v0.45.3](https://github.com/drizzle-team/drizzle-orm/releases/tag/0.45.3) ##### New Netlify DB Driver > Note: The Netlify DB driver is developed and maintained by the Netlify team. **Installation:** ```bash npm i @netlify/db ``` **Usage example:** ```typescript import { drizzle } from 'drizzle-orm/netlify-db'; // reads NETLIFY_DB_URL and NETLIFY_DB_DRIVER env vars const db = drizzle(); const result = await db.execute('select 1'); ``` ```typescript import { drizzle } from 'drizzle-orm/netlify-db'; const db = drizzle(process.env.DATABASE_URL); const result = await db.execute('select 1'); ``` ```typescript import { drizzle } from 'drizzle-orm/netlify-db'; // Explicit client — consumer controls the driver const db = drizzle({ client: netlifyDbClient }); const result = await db.execute('select 1'); ``` ##### [v0.45.2](https://github.com/drizzle-team/drizzle-orm/releases/tag/0.45.2) - Fixed `sql.identifier()`, `sql.as()` escaping issues. Previously all the values passed to this functions were not properly escaped causing a possible SQL Injection (CWE-89) vulnerability Thanks to [@EthanKim88](https://github.com/EthanKim88), [@0x90sh](https://github.com/0x90sh) and [@wgoodall01](https://github.com/wgoodall01) for reaching out to us with a reproduction and suggested fix ##### [v0.45.1](https://github.com/drizzle-team/drizzle-orm/releases/tag/0.45.1) - Fixed pg-native Pool detection in node-postgres transactions breaking in environments with forbidden `require()` ([#5107](drizzle-team/drizzle-orm#5107)) ##### [v0.45.0](https://github.com/drizzle-team/drizzle-orm/releases/tag/0.45.0) - Fixed pg-native Pool detection in node-postgres transactions - Allowed subqueries in select fields - Updated typo algorythm => algorithm - Fixed `$onUpdate` not handling `SQL` values (fixes [#2388](drizzle-team/drizzle-orm#2388), tests implemented by [L-Mario564](https://github.com/L-Mario564) in [#2911](drizzle-team/drizzle-orm#2911)) - Fixed `pg` mappers not handling `Date` instances in `bun-sql:postgresql` driver responses for `date`, `timestamp` types (fixes [#4493](drizzle-team/drizzle-orm#4493))
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses #2388.
$onUpdateon a column now handles sql values properly.