dBianchii / kodix-turbo

https://kodix.com.br
1 stars 0 forks source link

Update dependency drizzle-orm to ^0.33.0 #278

Closed renovate[bot] closed 2 months ago

renovate[bot] commented 2 months ago

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
drizzle-orm (source) ^0.32.0 -> ^0.33.0 age adoption passing confidence

Release Notes

drizzle-team/drizzle-orm (drizzle-orm) ### [`v0.33.0`](https://togithub.com/drizzle-team/drizzle-orm/releases/tag/0.33.0) [Compare Source](https://togithub.com/drizzle-team/drizzle-orm/compare/0.32.2...0.33.0) #### Breaking changes (for some of postgres.js users) ##### Bugs fixed for this breaking change - [\[BUG\]: jsonb always inserted as a json string when using postgres-js](https://togithub.com/drizzle-team/drizzle-orm/issues/724) - [\[BUG\]: jsonb type on postgres implement incorrectly](https://togithub.com/drizzle-team/drizzle-orm/issues/1511) > As we are doing with other drivers, we've changed the behavior of PostgreSQL-JS to pass raw JSON values, the same as you see them in the database. So if you are using the PostgreSQL-JS driver and passing data to Drizzle elsewhere, please check the new behavior of the client after it is passed to Drizzle. > We will update it to ensure it does not override driver behaviors, but this will be done as a complex task for everything in Drizzle in other releases If you were using `postgres-js` with `jsonb` fields, you might have seen stringified objects in your database, while drizzle insert and select operations were working as expected. You need to convert those fields from strings to actual JSON objects. To do this, you can use the following query to update your database: **if you are using jsonb:** ```sql update table_name set jsonb_column = (jsonb_column #>> '{}')::jsonb; ``` **if you are using json:** ```sql update table_name set json_column = (json_column #>> '{}')::json; ``` We've tested it in several cases, and it worked well, but only if all stringified objects are arrays or objects. If you have primitives like strings, numbers, booleans, etc., you can use this query to update all the fields **if you are using jsonb:** ```sql UPDATE table_name SET jsonb_column = CASE -- Convert to JSONB if it is a valid JSON object or array WHEN jsonb_column #>> '{}' LIKE '{%' OR jsonb_column #>> '{}' LIKE '[%' THEN (jsonb_column #>> '{}')::jsonb ELSE jsonb_column END WHERE jsonb_column IS NOT NULL; ``` **if you are using json:** ```sql UPDATE table_name SET json_column = CASE -- Convert to JSON if it is a valid JSON object or array WHEN json_column #>> '{}' LIKE '{%' OR json_column #>> '{}' LIKE '[%' THEN (json_column #>> '{}')::json ELSE json_column END WHERE json_column IS NOT NULL; ``` If nothing works for you and you are blocked, please reach out to me [@​AndriiSherman](https://togithub.com/AndriiSherman). I will try to help you! #### Bug Fixes - [\[BUG\]: boolean mode not working with prepared statements (bettersqlite)](https://togithub.com/drizzle-team/drizzle-orm/issues/2568) - thanks [@​veloii](https://togithub.com/veloii) - [\[BUG\]: isTable helper function is not working](https://togithub.com/drizzle-team/drizzle-orm/issues/2672) - thanks [@​hajek-raven](https://togithub.com/hajek-raven) - [\[BUG\]: Documentation is outdated on inArray and notInArray Methods](https://togithub.com/drizzle-team/drizzle-orm/issues/2690) - thanks [@​RemiPeruto](https://togithub.com/RemiPeruto) ### [`v0.32.2`](https://togithub.com/drizzle-team/drizzle-orm/releases/tag/0.32.2) [Compare Source](https://togithub.com/drizzle-team/drizzle-orm/compare/0.32.1...0.32.2) - Fix AWS Data API type hints bugs in RQB - Fix set transactions in MySQL bug - thanks [@​roguesherlock](https://togithub.com/roguesherlock) - Add forwaring dependencies within useLiveQuery, fixes [#​2651](https://togithub.com/drizzle-team/drizzle-orm/issues/2651) - thanks [@​anstapol](https://togithub.com/anstapol) - Export additional types from SQLite package, like `AnySQLiteUpdate` - thanks [@​veloii](https://togithub.com/veloii) ### [`v0.32.1`](https://togithub.com/drizzle-team/drizzle-orm/releases/tag/0.32.1) [Compare Source](https://togithub.com/drizzle-team/drizzle-orm/compare/0.32.0...0.32.1) - Fix typings for indexes and allow creating indexes on 3+ columns mixing columns and expressions - thanks [@​lbguilherme](https://togithub.com/lbguilherme)! - Added support for "limit 0" in all dialects - closes [#​2011](https://togithub.com/drizzle-team/drizzle-orm/issues/2011) - thanks [@​sillvva](https://togithub.com/sillvva)! - Make inArray and notInArray accept empty list, closes [#​1295](https://togithub.com/drizzle-team/drizzle-orm/issues/1295) - thanks [@​RemiPeruto](https://togithub.com/RemiPeruto)! - fix typo in lt typedoc - thanks [@​dalechyn](https://togithub.com/dalechyn)! - fix wrong example in README.md - thanks [@​7flash](https://togithub.com/7flash)!

Configuration

πŸ“… Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

β™» Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

πŸ”• Ignore: Close this PR and you won't be reminded about this update again.



This PR was generated by Mend Renovate. View the repository job log.

vercel[bot] commented 2 months ago

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

Name Status Preview Comments Updated (UTC)
kdx βœ… Ready (Inspect) Visit Preview πŸ’¬ Add feedback Aug 9, 2024 0:45am