grammyjs / storages

Storage adapters for grammY sessions.
48 stars 23 forks source link

chore(dependency): update prisma monorepo to v5 - autoclosed #188

Closed renovate[bot] closed 3 months ago

renovate[bot] commented 11 months ago

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@prisma/client (source) ^4.15.0 -> ^5.0.0 age adoption passing confidence
prisma (source) ^4.15.0 -> ^5.0.0 age adoption passing confidence

[!WARNING] Some dependencies could not be looked up. Check the Dependency Dashboard for more information.


Release Notes

prisma/prisma (@​prisma/client) ### [`v5.7.1`](https://togithub.com/prisma/prisma/releases/tag/5.7.1) [Compare Source](https://togithub.com/prisma/prisma/compare/5.7.0...5.7.1) Today, we are issuing the `5.7.1` patch release. This patch fixes multiple small problems in our `relationJoins` preview feature. If you ran into problems when testing `relationJoins` before, please give it another go with 5.7.1 and [share your feedback](https://togithub.com/prisma/prisma/discussions/22288) or create a [bug report](https://togithub.com/prisma/prisma/issues/new?assignees=\&labels=kind/bug\&projects=\&template=bug_report.yml) if you encounter any issues. ##### Fixes in Prisma Client - [`relationJoins`: Int\[\] return as null](https://togithub.com/prisma/prisma/issues/22303) - [`relationJoins`: fails when filtering includes by isNot: null](https://togithub.com/prisma/prisma/issues/22311) - [`relationJoins`: "The table (not available) does not exist in the current database."](https://togithub.com/prisma/prisma/issues/22299) - [`relationJoins`: PostgresError { code: "54023", message: "cannot pass more than 100 arguments to a function", severity: "ERROR", detail: None, column: None, hint: None }](https://togithub.com/prisma/prisma/issues/22298) - [`relationJoins`: Inconsistent column data: Unexpected conversion failure from String to datetime. Reason: $trailing input](https://togithub.com/prisma/prisma/issues/22293) ### [`v5.7.0`](https://togithub.com/prisma/prisma/releases/tag/5.7.0) [Compare Source](https://togithub.com/prisma/prisma/compare/5.6.0...5.7.0) 🌟 **Help us spread the word about Prisma by starring the repo or [posting on X (formerly Twitter)](https://twitter.com/intent/tweet?text=Check%20out%20the%20latest%20@​prisma%20release%20v5.7.0%20%F0%9F%9A%80%0D%0A%0D%0Ahttps://github.com/prisma/prisma/releases/tag/5.7.0) about the release.** ##### Highlights ✨ In this release, we improved the SQL queries Prisma Client generates for you with two new [Preview](https://www.prisma.io/docs/about/prisma/releases#preview) features, the [driver adapters](https://www.prisma.io/docs/concepts/components/database-drivers#driver-adapters), and support for the database drivers we currently support. 5.7.0 will be the last release of the year. Stay tuned for the next one in January! ✨ ##### Preview support for `JOIN`s for relation queries for PostgreSQL and CockroachDB We’re excited to announce Preview support for `JOIN`s in Prisma Client when querying relations. Support for `JOIN`s has been a [long-standing feature request](https://togithub.com/prisma/prisma/issues/5184), and this release adds support for PostgreSQL and CockroachDB. The upcoming releases will expand support for other databases Prisma supports. To get started using `JOIN`s, enable the Preview feature in your Prisma schema: ```prisma // schema.prisma generator client { provider = "prisma-client-js" previewFeatures = ["relationJoins"] } ``` Run `prisma generate` to regenerate Prisma Client and enable the Preview feature. Prisma Client will use a `JOIN` in your query to fetch relation data for a majority of the cases. **Example queries**
1-1 relation queries example **Prisma Client query** ```tsx await prisma.user.findUnique({ where: { id: 1 }, include: { profile: true } }) ``` **SQL** ```sql SELECT "t1"."id", "t1"."name", "User_profile"."__prisma_data__" AS "profile" FROM "public"."User" AS "t1" LEFT JOIN LATERAL ( SELECT COALESCE(JSON_AGG("__prisma_data__"), '[]') AS "__prisma_data__" FROM ( SELECT "t4"."__prisma_data__" FROM ( SELECT JSON_BUILD_OBJECT( 'id', "t3"."id", 'bio', "t3"."bio", 'userId', "t3"."userId" ) AS "__prisma_data__" FROM ( SELECT "t2".* FROM "public"."Profile" AS "t2" WHERE "t1"."id" = "t2"."userId" ) AS "t3" ) AS "t4" ) AS "t5" ) AS "User_profile" ON TRUE WHERE "t1"."id" = $1 LIMIT $2 ```
1-m relation queries example **Prisma Client query** ```tsx await prisma.user.findUnique({ where: { id: 1 }, include: { posts: true } }) ``` **SQL** ```sql SELECT "t1"."id", "t1"."name", "User_posts"."__prisma_data__" AS "posts" FROM "public"."User" AS "t1" LEFT JOIN LATERAL ( SELECT COALESCE(JSON_AGG("__prisma_data__"), '[]') AS "__prisma_data__" FROM ( SELECT "t4"."__prisma_data__" FROM ( SELECT JSON_BUILD_OBJECT( 'id', "t3"."id", 'title', "t3"."title", 'content', "t3"."content", 'published', "t3"."published", 'authorId', "t3"."authorId" ) AS "__prisma_data__" FROM ( SELECT "t2".* FROM "public"."Post" AS "t2" WHERE "t1"."id" = "t2"."authorId" /* root select */ ) AS "t3" /* inner select */ ) AS "t4" /* middle select */ ) AS "t5" /* outer select */ ) AS "User_posts" ON TRUE WHERE "t1"."id" = $1 LIMIT $2 ```
m-n relation queries example **Prisma Client query** ```tsx await prisma.post.findUnique({ where: { id: 1 }, include: { tags: true } }) ``` **SQL** ```sql SELECT "t1"."id", "t1"."title", "t1"."content", "t1"."published", "t1"."authorId", "Post_tags_m2m"."__prisma_data__" AS "tags" FROM "public"."Post" AS "t1" LEFT JOIN LATERAL ( SELECT COALESCE(JSON_AGG("__prisma_data__"), '[]') AS "__prisma_data__" FROM ( SELECT "Post_tags"."__prisma_data__" FROM "public"."_PostToTag" AS "t2" LEFT JOIN LATERAL ( SELECT JSON_BUILD_OBJECT('id', "t4"."id", 'name', "t4"."name") AS "__prisma_data__", "t4"."id" FROM ( SELECT "t3".* FROM "public"."Tag" AS "t3" WHERE "t2"."B" = "t3"."id" /* root select */ ) AS "t4" ) AS "Post_tags" ON TRUE WHERE "t2"."A" = "t1"."id" ) AS "Post_tags_m2m_1" ) AS "Post_tags_m2m" ON TRUE WHERE "t1"."id" = $1 LIMIT $2 ```
[Share your feedback](https://togithub.com/prisma/prisma/discussions/22288) and create a [bug report](https://togithub.com/prisma/prisma/issues/new?assignees=\&labels=kind/bug\&projects=\&template=bug_report.yml) if you encounter any issues. ##### Prisma’s `distinct` option now uses SQL queries (Preview) From this release, Prisma Client’s `distinct` option now uses the native SQL `DISTINCT ON` for unordered queries with PostgreSQL and CockroachDB. The upcoming releases will expand support for the other databases that Prisma supports. Prisma Client already supports [querying for distinct records](https://www.prisma.io/docs/concepts/components/prisma-client/aggregation-grouping-summarizing#select-distinct). However, Prisma Client took care of the post-processing for distinct records in memory. To get started, enable the Preview feature in your Prisma schema: ```prisma // schema.prisma generator client { provider = "prisma-client-js" previewFeatures = ["nativeDistinct"] } ``` Regenerate your Prisma Client to get started using the Preview feature. Given the following Prisma Client query: ```tsx await prisma.user.findMany({ distinct: ['role'], select: { role: true, }, }) ``` **Before 5.7.0** Previously, Prisma Client handled the post-processing to select distinct records in-memory. Therefore, the following query was generated and executed against your database: ```sql SELECT "public"."User"."id", "public"."User"."role"::text FROM "public"."User" WHERE 1 = 1 OFFSET $1 ``` **After 5.7.0** ```sql SELECT DISTINCT ON ("public"."User"."role") "public"."User"."id", "public"."User"."role"::text FROM "public"."User" WHERE 1 = 1 OFFSET $1 ``` [Share your feedback](https://togithub.com/prisma/prisma/discussions/22287) and create a [bug report](https://togithub.com/prisma/prisma/issues/new?assignees=\&labels=kind/bug\&projects=\&template=bug_report.yml) if you encounter any issues. ##### Improved support for Netlify using Node.js v20 In this release, we improved Prisma support when deploying to Netlify on Node.js v20. Previously, the Prisma Client could not resolve the location of the Query Engine after deploying to Netlify when using Node.js v20. If you run into this issue, we recommend updating to Prisma v5.7.0. We recommend giving [this comment](https://togithub.com/prisma/prisma/issues/22244#issuecomment-1842847194) on GitHub a read if you are not yet able to upgrade Prisma, to learn how to get around the error. ##### Fixes and improvements ##### Prisma Client - [Update: `InterpretationError("Unable to convert expression result into a set of selection results", None)` (starting with 5.2.0)](https://togithub.com/prisma/prisma/issues/21182) - [Error when inserting record with array enum column after `TRUNCATE`ing the table on CockroachDB: `placeholder $1 already has type string, cannot assign Color`](https://togithub.com/prisma/prisma/issues/21901) - [Netlify deployment with Node 20 break Prisma (`Prisma Client could not locate the Query Engine for runtime "rhel-openssl-3.0.x"`)](https://togithub.com/prisma/prisma/issues/22244) ##### Prisma - [Planetscale Driver doesn't work anymore after updating to 5.6.0 ](https://togithub.com/prisma/prisma/issues/21956) ##### Prisma Migrate - [`prisma debug` command does not show env variables declared in `.env` file](https://togithub.com/prisma/prisma/issues/21968) ##### Credits Huge thanks to [@​anuraaga](https://togithub.com/anuraaga), [@​onichandame](https://togithub.com/onichandame), [@​LucianBuzzo](https://togithub.com/LucianBuzzo), [@​RobertCraigie](https://togithub.com/RobertCraigie), [@​fqazi](https://togithub.com/fqazi), [@​KhooHaoYit](https://togithub.com/KhooHaoYit), [@​alencardc](https://togithub.com/alencardc), [@​Oreilles](https://togithub.com/Oreilles), [@​christianledgard](https://togithub.com/christianledgard), [@​skyzh](https://togithub.com/skyzh), [@​alula](https://togithub.com/alula), [@​AikoRamalho](https://togithub.com/AikoRamalho), [@​petradonka](https://togithub.com/petradonka) for helping! ##### Company news ##### 💼 We’re hiring! If you're interested in joining our growing team to help empower developers to build data-intensive applications, Prisma is the place for you. We're hiring for the following roles: - [Manager: Developer Advocacy](https://boards.greenhouse.io/prisma/jobs/7051313002) - [Software Engineer](https://boards.greenhouse.io/prisma/jobs/7034499002) ### [`v5.6.0`](https://togithub.com/prisma/prisma/releases/tag/5.6.0) [Compare Source](https://togithub.com/prisma/prisma/compare/5.5.2...5.6.0) 🌟 **Help us spread the word about Prisma by starring the repo or [tweeting](https://twitter.com/intent/tweet?text=Check%20out%20the%20latest%20@​prisma%20release%20v5.6.0%20%F0%9F%9A%80%0D%0A%0D%0Ahttps://github.com/prisma/prisma/releases/tag/5.6.0) about the release.** 🌟 ##### Highlights ##### Driver adapters improvements (Preview) In version [5.4.0](https://togithub.com/prisma/prisma/releases/tag/5.4.0), we released `driverAdapters` into Preview. The `driverAdapters` feature enables Prisma Client to access your database using JavaScript or Serverless database drivers. In this release, we fixed many bugs for the existing driver adapters. We appreciate all the community feedback that has helped us improve this feature! ##### PlanetScale serverless driver adapter improvements This release also introduces a small breaking change to the `@prisma/adapter-planetscale` package to improve its stability and performance. The serverless driver adapter will now use a connection pool instead of a single connection from PlanetScale’s serverless driver. In case you’re using the `@prisma/adapter-planetscale`, update your Prisma Client instance with the following: ```diff -import { connect } from '@​planetscale/database' +import { Client } from '@​planetscale/database' import { PrismaPlanetScale } from '@​prisma/adapter-planetscale' import { PrismaClient } from '@​prisma/client' import { fetch as undiciFetch } from 'undici'; -const connection = connect({ url: connectionString, fetch: undiciFetch }) +const client = new Client({ url: connectionString, fetch: undiciFetch }) -const adapter = new PrismaPlanetScale(connection) +const adapter = new PrismaPlanetScale(client) const prisma = new PrismaClient({ adapter }) ``` ##### Request for feedback We encourage you to try out the driver adapters and share your feedback to help us move it to General Availability in either of the following GitHub discussions: - [Neon](https://togithub.com/prisma/prisma/discussions/21346) - [PlanetScale](https://togithub.com/prisma/prisma/discussions/21347) - [Turso](https://togithub.com/prisma/prisma/releases#:~:text=Let%20us%20know%20what%20you%20think) Refer to [our docs](https://www.prisma.io/docs/concepts/components/database-drivers#driver-adapters) to learn more about driver adapters. ##### New `prisma debug` command This release introduces a new command: `prisma debug`. The command provides debugging information such as environment variables that Prisma Client, Prisma Migrate, Prisma CLI, and Prisma Studio use. The command is also useful when creating a bug report as the information complements the output of the `prisma -v` command. You can learn more about the command in our [docs](https://www.prisma.io/docs/reference/api-reference/command-reference#debug). ##### Read replicas extension improvements We also released [version 0.3.0](https://togithub.com/prisma/extension-read-replicas/releases/tag/v0.3.0) of the `@prisma/extension-read-replicas` package that contains the following improvements: - A new `$replica()` method that explicitly enables you to use a replica for your query. For example, by default, the `queryRaw` and `executeRaw` methods are forwarded to the primary database, as they could try to write to the database. You can use the `$replica()` method with either of the `*Raw` methods to explicitly execute your query against a replica instead of your primary database. - Validation for when there’s an empty list of replicas. - Webpack bundling fixes We want to thank you, our community members, for your contributions! 🙏 You can find additional information on the changes in the [extension’s release](https://togithub.com/prisma/extension-read-replicas/releases/tag/v0.3.0). You can learn more about the extension in the [announcement blog post](https://www.prisma.io/blog/read-replicas-prisma-client-extension-f66prwk56wow). ##### Package provenance npm has introduced [provenance statements](https://docs.npmjs.com/generating-provenance-statements) to improve supply-chain security and transparency of packages. This allows developers to verify where and how packages are built. Starting with the 5.6.0 release, all npm packages for Prisma ORM will be published with provenance statements. If you maintain a Prisma Client extension or generator, we encourage you to enable provenance statements when publishing to npm. ##### Fixes and improvements ##### Prisma Migrate - [Weird error message on `db push` with invalid connection string: Connection string redacted, weird grammar](https://togithub.com/prisma/prisma/issues/20230) - [Regression for MongoDB introspection in 5.4.0](https://togithub.com/prisma/prisma/issues/21441) - [Inconsistent datetime column data importing to Turso](https://togithub.com/prisma/prisma/issues/21552) - [`db pull --url=...` logs full connection string on `P4001 The introspected database was empty`](https://togithub.com/prisma/prisma/issues/21733) ##### Prisma Client - [`prisma_pool_connections_idle` reports misleading number](https://togithub.com/prisma/prisma/issues/21221) - [Update and read issues with `@prisma/adapter-planetscale`](https://togithub.com/prisma/prisma/issues/21592) - [5.5.0 regression: typescript error when trying to pass `PrismaPlanetScale` adapter to the constructor](https://togithub.com/prisma/prisma/issues/21613) - [5.5.0/1: `Error: sha256 checksum of https://binaries.prisma.sh/all_commits/475c616176945d72f4330c92801f0c5e6398dc0f/windows/query_en gine.dll.node.gz (zipped) should be 748d039badd0919d022fff7d554b66b6937b79035861a6ae9a80c5a95eee76f5 but is b867ad335ee6f58c6a38f665dd641c95e6adff3061f92b7613c62cae1c3362bb`](https://togithub.com/prisma/prisma/issues/21616) ##### Prisma CLI - [`prisma debug`](https://togithub.com/prisma/prisma/issues/21619) ##### Credits Huge thanks to [@​onichandame](https://togithub.com/onichandame), [@​LucianBuzzo](https://togithub.com/LucianBuzzo), [@​RobertCraigie](https://togithub.com/RobertCraigie), [@​fqazi](https://togithub.com/fqazi), [@​KhooHaoYit](https://togithub.com/KhooHaoYit), [@​alencardc](https://togithub.com/alencardc), [@​Oreilles](https://togithub.com/Oreilles), [@​christianledgard](https://togithub.com/christianledgard), [@​skyzh](https://togithub.com/skyzh), [@​alula](https://togithub.com/alula), [@​luxaritas](https://togithub.com/luxaritas), [@​Nasfame](https://togithub.com/Nasfame), [@​lukahartwig](https://togithub.com/lukahartwig), [@​steebchen](https://togithub.com/steebchen), [@​icanipa](https://togithub.com/icanipa) for helping! ##### Miscellaneous ##### Prisma Accelerate is now Generally Available We're excited to share that [Prisma Accelerate](https://pris.ly/accelerate-home-orm-release) is now Generally Available. Prisma Accelerate is a global database cache that's available in over 280 locations and provides scalable connection pooling for serverless and edge applications. Learn more in the [announcement blog post](https://pris.ly/accelerate-ga-post-orm-release). Sign up and try out [Prisma Accelerate](https://pris.ly/pdp-console-orm-release) ##### 💼 We’re hiring! If you're interested in joining our growing team to help empower developers to build data-intensive applications, Prisma is the place for you. We're hiring for an [Engineering Manager: Prisma Data Platform](https://boards.greenhouse.io/prisma/jobs/7009408002). ### [`v5.5.2`](https://togithub.com/prisma/prisma/releases/tag/5.5.2) [Compare Source](https://togithub.com/prisma/prisma/compare/5.5.1...5.5.2) Today, we are issuing the `5.5.2` patch release. ##### Fix in Prisma CLI - [Error: sha256 checksum of https://binaries.prisma.sh/all_commits/475c616176945d72f4330c92801f0c5e6398dc0f/windows/query_en gine.dll.node.gz (zipped) should be 748d039badd0919d022fff7d554b66b6937b79035861a6ae9a80c5a95eee76f5 but is b867ad335ee6f58c6a38f665dd641c95e6adff3061f92b7613c62cae1c3362bb](https://togithub.com/prisma/prisma/issues/21616) ### [`v5.5.1`](https://togithub.com/prisma/prisma/releases/tag/5.5.1) [Compare Source](https://togithub.com/prisma/prisma/compare/5.5.0...5.5.1) Today, we are issuing the `5.5.1` patch release. ##### Fix in Prisma Client - [5.5.0 regression: typescript error when trying to pass PrismaPlanetScale adapter to the constructor](https://togithub.com/prisma/prisma/issues/21613) ### [`v5.5.0`](https://togithub.com/prisma/prisma/releases/tag/5.5.0) [Compare Source](https://togithub.com/prisma/prisma/compare/5.4.2...5.5.0) 🌟 **Help us spread the word about Prisma by starring the repo or [tweeting](https://twitter.com/intent/tweet?text=Check%20out%20the%20latest%20@​prisma%20release%20v5.5.0%20%F0%9F%9A%80%0D%0A%0D%0Ahttps://github.com/prisma/prisma/releases/tag/5.5.0) about the release.** 🌟 ##### Highlights ##### Serverless database drivers improvements and request for feedback (Preview) In version [5.4.0](https://togithub.com/prisma/prisma/releases/tag/5.4.0), we released `driverAdapters` into Preview. The `driverAdapter` feature enables Prisma Client to access your database using other JavaScript or Serverless database drivers such as Neon, PlanetScale, and Turso. The driver adapters allow Prisma Client to connect to your database using protocols besides TCP, such as HTTP (PlanetScale and Turso) and WebSockets (Neon). You can learn more about the Preview feature from the [announcement blog post](https://www.prisma.io/blog/serverless-database-drivers-KML1ehXORxZV). In this release, we focused our efforts on fixing bugs and improving the stability of the Preview feature. We encourage you to try it out and share your feedback to help us move it to General Availability in either of the following GitHub discussions: - [Neon](https://togithub.com/prisma/prisma/discussions/21346) - [PlanetScale](https://togithub.com/prisma/prisma/discussions/21347) - [Turso](https://togithub.com/prisma/prisma/discussions/21345) ##### New flags for the `prisma init` command This release introduces 3 new flags you can provide when initializing Prisma in your project using the [`prisma init`](https://www.prisma.io/docs/reference/api-reference/command-reference#init) command: - `--generator-provider`: Defines the default generator to use - `--preview-features`: Specifies the default Preview features to use in your project - `--output`: Specifies the default output location for the generated client ##### Fixes and improvements ##### Prisma CLI - [Prisma init: allow setting generator provider value](https://togithub.com/prisma/prisma/issues/17737) ##### Prisma Client - [`prisma.model.count` does not type `distinct` correctly](https://togithub.com/prisma/prisma/issues/19598) - [Generate fails on 5.2 with unsupported type](https://togithub.com/prisma/prisma/issues/20993) - [Invalid `….findMany()` invocation: The column `j1.id` does not exist in the current database.](https://togithub.com/prisma/prisma/issues/21352) - [5.4.0 subquery has too many columns](https://togithub.com/prisma/prisma/issues/21356) - [One-to-Many relationship does not join on the specified field](https://togithub.com/prisma/prisma/issues/21366) - [Planetscale driver: unsupported column type NULL](https://togithub.com/prisma/prisma/issues/21369) ##### Credits Huge thanks to [@​onichandame](https://togithub.com/onichandame), [@​fqazi](https://togithub.com/fqazi), [@​KhooHaoYit](https://togithub.com/KhooHaoYit), [@​alencardc](https://togithub.com/alencardc), [@​Oreilles](https://togithub.com/Oreilles), [@​christianledgard](https://togithub.com/christianledgard), [@​skyzh](https://togithub.com/skyzh), [@​alula](https://togithub.com/alula), [@​michaelpoellath](https://togithub.com/michaelpoellath), [@​lukahartwig](https://togithub.com/lukahartwig), [@​steebchen](https://togithub.com/steebchen), [@​icanipa](https://togithub.com/icanipa), [@​jiashengguo](https://togithub.com/jiashengguo), [@​stephenwade](https://togithub.com/stephenwade) for helping! ##### 💼 We're hiring! If you're interested in joining our growing team to help empower developers to build data-intensive applications, Prisma is the place for you. We're currently hiring for the following roles: - [Software Engineer](https://boards.greenhouse.io/prisma/jobs/6948042002) - [Senior Software Engineer (Rust)](https://boards.greenhouse.io/prisma/jobs/6940273002) - [Engineering Manager: Prisma Data Platform](https://boards.greenhouse.io/prisma/jobs/6927046002) ### [`v5.4.2`](https://togithub.com/prisma/prisma/releases/tag/5.4.2) [Compare Source](https://togithub.com/prisma/prisma/compare/5.4.1...5.4.2) Today, we are issuing the `5.4.2` patch release. #### Fix in Prisma Client - [5.4.0 subquery has too many columns](https://togithub.com/prisma/prisma/issues/21356) - [One-to-Many relationship does not join on the specified field](https://togithub.com/prisma/prisma/issues/21366) ### [`v5.4.1`](https://togithub.com/prisma/prisma/releases/tag/5.4.1) [Compare Source](https://togithub.com/prisma/prisma/compare/5.4.0...5.4.1) Today, we are issuing the `5.4.1` patch release. ##### Fix in Prisma Client - [Invalid `….findMany()` invocation: The column `j1.id` does not exist in the current database.](https://togithub.com/prisma/prisma/issues/21352) ##### Fix in `@prisma/adapter-planetscale` - [Planetscale driver: unsupported column type NULL](https://togithub.com/prisma/prisma/issues/21369) ### [`v5.4.0`](https://togithub.com/prisma/prisma/releases/tag/5.4.0) [Compare Source](https://togithub.com/prisma/prisma/compare/5.3.1...5.4.0) 🌟 **Help us spread the word about Prisma by starring the repo or [tweeting](https://twitter.com/intent/tweet?text=Check%20out%20the%20latest%20@​prisma%20release%20v5.4.0%20%F0%9F%9A%80%0D%0A%0D%0Ahttps://github.com/prisma/prisma/releases/tag/5.4.0) about the release.** 🌟 ### **Highlights** #### Preview support for PlanetScale and Neon serverless database drivers We’re excited to announce [Preview](https://www.prisma.io/docs/about/prisma/releases#preview) support for the Neon and PlanetScale serverless database drivers. The PlanetScale and Neon serverless database drivers allow Prisma to connect to your database using protocols besides TCP — HTTP (PlanetScale) or WebSockets (Neon). To get started with the serverless database drivers, first enable the `driverAdapters` Preview feature flag in your Prisma schema: ```prisma // schema.prisma generator client { provider = "prisma-client-js" previewFeatures = ["driverAdapters"] } ``` Next, to set up Prisma Client to use the serverless database drivers: ##### **PlanetScale** Install the Prisma adapter for PlanetScale and [PlanetScale serverless database driver](https://togithub.com/planetscale/database-js), and undici: ```bash npm install @​prisma/adapter-planetscale @​planetscale/database undici ``` > Prisma ORM supports Node 16 and up. In Node 18 and up, `undici` is not needed. Ensure you update the host value in your connection string to `aws.connect.psdb.cloud`. You can learn more about this [here](https://planetscale.com/docs/tutorials/planetscale-serverless-driver#add-and-use-the-planetscale-serverless-driver-for-javascript-to-your-project). ```bash DATABASE_URL='mysql://johndoe:strongpassword@aws.connect.psdb.cloud/clear_nightsky?sslaccept=strict' ``` Update your Prisma Client instance to use the PlanetScale database driver: ```tsx // Import required dependencies import { connect } from '@​planetscale/database'; import { PrismaPlanetScale } from '@​prisma/adapter-planetscale'; import { PrismaClient } from '@​prisma/client'; import { fetch as undiciFetch } from 'undici'; // Initialize Prisma Client with the PlanetScale serverless database driver const connection = connect({ url: connectionString, fetch: undiciFetch }); const adapter = new PrismaPlanetScale(connection); const prisma = new PrismaClient({ adapter }); ``` ##### **Neon** Install the Prisma adapter for Neon, [Neon serverless database driver](https://togithub.com/neondatabase/serverless) and undici (WebSockets): ```bash npm install @​prisma/adapter-neon @​neondatabase/serverless undici ``` Update your Prisma Client instance to use the Neon serverless database driver: ```tsx // Import required dependencies import { Pool, neonConfig } from '@​neondatabase/serverless'; import { PrismaNeon } from '@​prisma/adapter-neon'; import { PrismaClient } from '@​prisma/client'; import { WebSocket } from 'undici' neonConfig.webSocketConstructor = WebSocket; // Initialize Prisma Client with the Neon serverless database driver const pool = new Pool({ connectionString: process.env.DATABASE_URL }); const adapter = new PrismaNeon(pool); const prisma = new PrismaClient({ adapter }); ``` Let us know your feedback about the [Neon](https://togithub.com/prisma/prisma/discussions/21346) or [Planetscale](https://togithub.com/prisma/prisma/discussions/21347) serverless database drivers in the linked GitHub discussions. Create a [bug report](https://togithub.com/prisma/prisma/issues/new?assignees=\&labels=kind/bug\&projects=\&template=bug_report.yml) if you run into any issues. #### Early Access support for Turso [Turso](https://turso.tech/) is an edge-hosted, distributed database that's based on [libSQL](https://turso.tech/libsql), an open-source and open-contribution fork of SQLite, enabling you to bring data closer to your application and minimize query latency. Since support for Turso is in Early Access, there may be some rough edges which we’re still working on it to improve the API and overall support. Additionally, it is behind the `driverAdapters` Preview feature flag. Enable it to get started using Turso in your project: ```groovy // schema.prisma generator client { provider = "prisma-client-js" previewFeatures = ["driverAdapters"] } ``` Next, install the Prisma Client adapter for Turso and the `libSQL` database client ```bash npm install @​prisma/adapter-libsql @​libsql/client ``` Update your Prisma Client instance: ```tsx // Import required dependencies import { PrismaClient } from '@​prisma/client' import { PrismaLibSQL } from '@​prisma/adapter-libsql' import { createClient } from '@​libsql/client' // Create a new instance of the libSQL database client const libsql = createClient({ // @​ts-expect-error url: process.env.TURSO_DATABASE_URL, authToken: process.env.TURSO_AUTH_TOKEN }) // Create a Prisma "adapter" for libSQL const adapter = new PrismaLibSQL(libsql) // Pass the adapter option to the Prisma Client instance const prisma = new PrismaClient({ adapter }) ``` You can learn more on how to use Prisma together with Turso in the [announcement blog post](https://www.prisma.io/blog/prisma-turso-ea-support-rXGd_Tmy3UXX). Try it out! [Let us know what you think](https://togithub.com/prisma/prisma/discussions/21345) and create a [bug report](https://togithub.com/prisma/prisma/issues/new?assignees=\&labels=kind/bug\&projects=\&template=bug_report.yml) if you run into any issues. #### Query performance improvements In our continued efforts to make Prisma Client faster, we identified and improved the performance of different types of queries. ##### Relation filters improvements We made the following improvements to relation filters: - Removed an unnecessary `INNER JOIN` used in relation filter queries (Big thank you to [@​KhooHaoYit](https://togithub.com/KhooHaoYit) for helping out) - Use of `LEFT JOIN`'s for to-one relations. Previously, Prisma made use of sub-queries to fetch data. **Example Prisma Client query** ```tsx prisma.comment.findMany({ where: { post: { author: { name: "John" } } } }) ``` **Before 5.4.0** ```sql SELECT "Comment"."id" FROM "Comment" WHERE ("Comment"."id") IN ( SELECT "t0"."id" FROM "Comment" AS "t0" INNER JOIN "Post" AS "j0" ON ("j0"."id") = ("t0"."postId") WHERE ( ("j0"."id") IN ( SELECT "t1"."id" FROM "Post" AS "t1" INNER JOIN "User" AS "j1" ON ("j1"."id") = ("t1"."userId") WHERE ( "j1"."name" = $ 1 AND "t1"."id" IS NOT NULL ) ) AND "t0"."id" IS NOT NULL ) ); ``` **After 5.4.0** ```sql SELECT "Comment"."id" FROM "Comment" LEFT JOIN "Post" AS "j1" ON ("j1"."id") = ("Comment"."postId") LEFT JOIN "User" AS "j2" ON ("j2"."id") = ("j1"."userId") WHERE ( "j2"."name" = $ 1 AND ("j2"."id" IS NOT NULL) AND ("j1"."id" IS NOT NULL) ); ``` If you’re interested in more details on the relation query filter improvements, you can take a look at [this pull request](https://togithub.com/prisma/prisma-engines/pull/4235). ##### Enum improvements on PostgreSQL and CockroachDB Previously, when an enum value was used in a query, our Postgres driver would make additional queries to resolve the enum types that were used. In this release, we’re making improvements by casting enums to `TEXT` to avoid the additional roundtrips when resolving the types. This change should have the most impact if you’re using `pgBouncer` or if you’re running Prisma in a serverless environment, where our Postgres driver can’t cache enum types information. **Prisma schema** ```groovy model User { id Int @​id @​default(cuid()) role Role } enum Role { User Admin } ``` **Prisma Client query** ```tsx await prisma.user.findMany({ where: { role: "Admin" } }) ``` **Before 5.4.0** ```sql -- Internal driver query SELECT t.typname, t.typtype, t.typelem, r.rngsubtype, t.typbasetype, n.nspname, t.typrelid FROM pg_catalog.pg_type t LEFT OUTER JOIN pg_catalog.pg_range r ON r.rngtypid = t.oid INNER JOIN pg_catalog.pg_namespace n ON t.typnamespace = n.oid WHERE t.oid = $1; -- Internal driver query SELECT enumlabel FROM pg_catalog.pg_enum WHERE enumtypid = $1 ORDER BY enumsortorder; -- Prisma Client query SELECT id, role FROM "User" WHERE role = $1; ``` **After 5.4.0** ```sql -- Prisma Client query SELECT id, role::text FROM "User" WHERE role = CAST($1::text AS "Role); ``` ##### Bulk delete improvements We optimized the `deleteMany` operation by: - Removing all `SELECT` queries used to fetch data that would be used as input for the `DELETE` operation. In some cases, this also improves index usage. - Removing the transaction previously used as it’s now a single atomic operation. **Prisma Client query** ```tsx await prisma.post.deleteMany({ where: { id: { gt: 1, lt: 10, } } }) ``` **Before 5.4.0** ```sql BEGIN SELECT id FROM "Post" WHERE id > 1 AND id < 10; SELECT id FROM "Post" WHERE id > 1 AND id < 10 AND id IN (<...select ids>); DELETE FROM "Post" WHERE id IN (<...select ids>) AND id > 1 AND id < 10; COMMIT ``` **After 5.4.0** ```sql DELETE FROM "Post" WHERE id > 1 AND id < 10; ``` ##### Upsert improvements We improved the `upsert` operation ([non-native database upsert](https://www.prisma.io/docs/reference/api-reference/prisma-client-reference#database-upserts)) by removing a redundant `SELECT` query: **Prisma Client query** ```tsx await prisma.user.upsert({ where: { email: "john@doe.com" }, create: { email: "john@doe.com", firstName: "John" }, update: { firstName: "Johnny" }, }) ``` **Before 5.4.0** ```sql SELECT `User`.`id` FROM `User` WHERE `User`.`email` = ?; SELECT `User`.`id` FROM `User` WHERE `User`.`email` = ?; UPDATE `prisma`.`User` SET `firstName` = ? WHERE `prisma`.`User`.`id` IN (?) AND `prisma`.`User`.`email` = ?; SELECT `User`.`id` FROM `User` WHERE `User`.`id` = ?; ``` **After 5.4.0** ```sql SELECT `User`.`id` FROM `User` WHERE `User`.`email` = ?; UPDATE `prisma`.`User` SET `firstName` = ? WHERE `prisma`.`User`.`id` IN (?) AND `prisma`.`User`.`email` = ?; SELECT `User`.`id` FROM `User` WHERE `User`.`id` = ?; ``` #### Fixes and improvements ##### Prisma Client - [Unnecessary `SELECT` may be generated by `upsert()`](https://togithub.com/prisma/prisma/issues/5686) - [Inefficient deleteMany query generation](https://togithub.com/prisma/prisma/issues/7232) - [Prisma can generate an overly complex and inefficient query in some cases](https://togithub.com/prisma/prisma/issues/7894) - [`deleteMany` optimisation](https://togithub.com/prisma/prisma/issues/8239) - [CockroachDB: Highly Variable Query Response Times](https://togithub.com/prisma/prisma/issues/11317) - [Extremely poor relation where clause query](https://togithub.com/prisma/prisma/issues/14688) - [Enums loaded as part of transaction after `UPDATE`, slowing down transaction.](https://togithub.com/prisma/prisma/issues/14955) - [ MongoDB `deleteMany` seems to send 2 identical read queries first before triggering the actual delete](https://togithub.com/prisma/prisma/issues/15085) - [Query validation messages reference color output even if colors are not enabled](https://togithub.com/prisma/prisma/issues/17706) - [Prisma generates unnecessary subquery, which is inefficient](https://togithub.com/prisma/prisma/issues/17879) - [Unnecessary INNER JOIN when doing nested queries](https://togithub.com/prisma/prisma/issues/18343) - [Semver checks for yarn and typescript could potentially fail](https://togithub.com/prisma/prisma/issues/18751) - [Prisma overrides type caching when in PGBouncer mode, causing 9,000 enum queries per second on a production system](https://togithub.com/prisma/prisma/issues/19325) - [deleteMany generates double WHERE filter](https://togithub.com/prisma/prisma/issues/19950) - [Prisma generate command crashes with `RustPanic: RuntimeError: panicked at 'internal error: entered unreachable code', query-engine/prisma-models/src/field/scalar.rs:93:50`](https://togithub.com/prisma/prisma/issues/20037) - [Duplicated keys in `metrics` properties](https://togithub.com/prisma/prisma/issues/21069) - [Prisma Client extension with method override and `jest-mock-extended` or `vitest-mock-extended` expects `never` input ](https://togithub.com/prisma/prisma/issues/21136) ##### Language tools (e.g. VS Code) - [Auto-completion suggests attributes already present ](https://togithub.com/prisma/language-tools/issues/1326) - [Quick Fix: when `@@​schema` is defined in a block without the `schemas` attribute](https://togithub.com/prisma/language-tools/issues/1333) ##### Prisma Engines - [CockroachDB: get_columns can hit inefficiency inside pg_class](https://togithub.com/prisma/prisma-engines/issues/4250) #### Credits Huge thanks to [@​onichandame](https://togithub.com/onichandame), [@​fqazi](https://togithub.com/fqazi), [@​KhooHaoYit](https://togithub.com/KhooHaoYit), [@​alencardc](https://togithub.com/alencardc), [@​Oreilles](https://togithub.com/Oreilles), [@​christianledgard](https://togithub.com/christianledgard), [@​skyzh](https://togithub.com/skyzh), [@​alula](https://togithub.com/alula), [@​michaelpoellath](https://togithub.com/michaelpoellath), [@​RobertCraigie](https://togithub.com/RobertCraigie), [@​icanipa](https://togithub.com/icanipa), [@​jiashengguo](https://togithub.com/jiashengguo), [@​stephenwade](https://togithub.com/stephenwade), [@​darthmaim](https://togithub.com/darthmaim), [@​ludralph](https://togithub.com/ludralph), [@​Gerschtli](https://togithub.com/Gerschtli), [@​andyjy](https://togithub.com/andyjy) for helping! #### 💼 We're hiring! If you're interested in joining our growing team to help empower developers to build data-intensive applications, Prisma is the place for you. We're currently hiring for the following roles: - [Software Engineer](https://boards.greenhouse.io/prisma/jobs/6948042002) - [Senior Software Engineer (Rust)](https://boards.greenhouse.io/prisma/jobs/6940273002) - [Engineering Manager: Prisma Data Platform](https://boards.greenhouse.io/prisma/jobs/6927046002) Feel free to read the job descriptions and apply using the links provided. ### [`v5.3.1`](https://togithub.com/prisma/prisma/releases/tag/5.3.1) [Compare Source](https://togithub.com/prisma/prisma/compare/5.3.0...5.3.1) Today, we are issuing the `5.3.1` patch release. #### Fix in Prisma Client - [Duplicated keys in `metrics` properties](https://togithub.com/prisma/prisma/issues/21069) ### [`v5.3.0`](https://togithub.com/prisma/prisma/releases/tag/5.3.0) [Compare Source](https://togithub.com/prisma/prisma/compare/5.2.0...5.3.0) 🌟 **Help us spread the word about Prisma by starring the repo or [tweeting](https://twitter.com/intent/tweet?text=Check%20out%20the%20latest%20@​prisma%20release%20v5.3.0%20%F0%9F%9A%80%0D%0A%0D%0Ahttps://github.com/prisma/prisma/releases/tag/5.3.0) about the release.** 🌟 ### Highlights In this sprint, we’ve made bug fixes and overall improvements to Prisma Client. We’ve been working on a few projects that will be announced soon. Stay tuned for the upcoming releases for updates! #### Improvements and bug fixes We made the following changes: ##### Prisma Client improvements - Validation for `undefined` values in arrays in `Json` fields We added runtime validation for `undefined` values in arrays in `Json` fields. Prisma Client will now return an error when an array contains an `undefined` value. Therefore, we encourage you to add validation that either removes the value or transforms it to `null` if you stumble on the runtime validation: ```ts // Query await prisma.user.findMany({ where: { // JSON field preferences: [undefined, '"theme": "dark"', null, ] } }) // Example error message on running the query Can not use `undefined` value within array. Use `null` or filter out `undefined` values ``` - Performance improvements for models with many unique fields This release improves Prisma Client’s memory consumption for models with many `@unique` constraints. This was a regression from version 4.10.1, where in some cases, if a model had many unique constraints, Prisma Client would use up a lot of available memory. - Fixed the segmentation fault error that used to occur on ARM64 Linux binary targets - Metrics Preview feature improvements: - We updated the counters and gauge properties - We fixed the bug that caused the `prisma_pool_connections_open` metric to have a negative value in some cases. ##### Prisma Migrate improvements - Fixed an introspection bug for MongoDB views. Previously, if a MongoDB database contained a view, `prisma db pull` would throw an error. We resolved this, and views are now ignored. - Added the `PRISMA_SCHEMA_DISABLE_ADVISORY_LOCK` environment variable that enables you to disable [advisory locking](https://www.prisma.io/docs/concepts/components/prisma-migrate/migrate-development-production#advisory-locking). ##### [VS Code extension](https://marketplace.visualstudio.com/items?itemName=Prisma.prisma) improvements - Added support for rendering multi-line comments in tooltips when hovering on a block. - Improved the auto-completion for composite types in other blocks. - Added a Code Action that allows you to replace `SetDefault` with `NoAction` when using MySQL and the default/`foreignKeys` relation mode. #### Fixes and improvements ##### Prisma Migrate - [Percona-XtraDB-Cluster prohibits use of GET_LOCK with pxc_strict_mode = ENFORCING](https://togithub.com/prisma/prisma/issues/16020) - [MongoDB views should be ignored introspecting the database](https://togithub.com/prisma/prisma/issues/16179) - [Error in Connector on MongoDB executing listIndex: "system.views"](https://togithub.com/prisma/prisma/issues/17006) - [`prisma migrate deploy`: `MariaDB doesn't yet support 'GET_LOCK in cluster (WSREP_ON=ON)'`](https://togithub.com/prisma/prisma/issues/19350) ##### Prisma Client - [Remove all special cases for Data Proxy in our tests](https://togithub.com/prisma/prisma/issues/16101) - [Segmentation fault on ARM64 Linux](https://togithub.com/prisma/prisma/issues/18510) - [In the metrics feature a gauge & counter are swapped](https://togithub.com/prisma/prisma/issues/18760) - [The prisma metrics `prisma_pool_connections_open` has a bug where it goes negative](https://togithub.com/prisma/prisma/issues/18761) - [Prisma crashes with GraphQL queries of nested one-to-many relationship](https://togithub.com/prisma/prisma/issues/18787) - [P1017 Server has closed the connection on linux_arm64](https://togithub.com/prisma/prisma/issues/19209) - [`Error: socket hang up` on Linux/arm64](https://togithub.com/prisma/prisma/issues/19419) - [Panic in Query Engine with SIGABRT signal (Debian Bookworm, engineType = binary)](https://togithub.com/prisma/prisma/issues/19743) - [Prisma 5 drops `undefined` from Arrays when using Json fields with Postgres](https://togithub.com/prisma/prisma/issues/20325) - [Suspected memory leak in Lambda function after upgrading from 4.10.1](https://togithub.com/prisma/prisma/issues/20799) - [Error when generating - No unsupported field should reach that path](https://togithub.com/prisma/prisma/issues/20986) ##### Language tools (e.g. VS Code) - [Models with multi line comments only show last line in tooltip](https://togithub.com/prisma/language-tools/issues/861) - [Add VS Code quick fix / code action to replace `SetDefault` with `NoAction` when `provider = "mysql"` and `relationMode = "foreignKeys" | default`](https://togithub.com/prisma/language-tools/issues/1286) - [Composite Types aren't offered as being auto-completable in other blocks](https://togithub.com/prisma/language-tools/issues/1495) #### Credits Huge thanks to [@​alencardc](https://togithub.com/alencardc), [@​Oreilles](https://togithub.com/Oreilles), [@​christianledgard](https://togithub.com/christianledgard), [@​skyzh](https://togithub.com/skyzh), [@​alula](https://togithub.com/alula), [@​michaelpoellath](https://togithub.com/michaelpoellath), [@​RobertCraigie](https://togithub.com/RobertCraigie), [@​stephenwade](https://togithub.com/stephenwade) for helping! ### [`v5.2.0`](https://togithub.com/prisma/prisma/releases/tag/5.2.0) [Compare Source](https://togithub.com/prisma/prisma/compare/5.1.1...5.2.0) 🌟 **Help us spread the word about Prisma by starring the repo or [tweeting](https://twitter.com/intent/tweet?text=Check%20out%20the%20latest%20@​prisma%20release%20v5.2.0%20%F0%9F%9A%80%0D%0A%0D%0Ahttps://github.com/prisma/prisma/releases/tag/5.2.0) about the release.** 🌟 ### Highlights #### Improved Prisma Client experience for Prisma Accelerate and Data Proxy In this release, we’ve made the following improvements to Prisma Client when using [Prisma Accelerate](https://www.prisma.io/data-platform/accelerate) or [Prisma Data Proxy](https://www.prisma.io/data-platform/proxy): - Prisma Client will now automatically determine how it should connect to the database depending on the protocol in the connection string. If the connection string starts with `prisma://`, Prisma Client will try to connect to your database using Prisma Accelerate or Prisma Data Proxy. - Prisma Studio now works with Prisma Data Proxy and Prisma Accelerate. - We’ve introduced a new `--no-engine` flag which will prevent a Query Engine file from being included in the generated Prisma Client. This flag will also help ensure the bundle size of your application remains small by excluding the Query Engine files from the generated Prisma Client. ```bash prisma generate --no-engine ``` The `--data-proxy` and `--accelerate` flags have not been removed but are now aliases for the new `--no-engine` flag. We recommend using the `--no-engine` flag when generating Prisma Client that uses either Accelerate or Data Proxy. #### Simplified connection string override in Prisma Client This release simplifies the API used when programmatically overriding the connection string by introducing the `datasourceUrl` property in Prisma Client’s constructor. This means you do not have to use the datasource name defined in your Prisma schema. ```tsx const prisma = new PrismaClient({ datasourceUrl: "postgresql://johndoe:randompassword@localhost:5432/mydb", }) ``` #### Query performance improvements Continuing our work from [5.1.0](https://togithub.com/prisma/prisma/releases/tag/5.1.0) we made further performance improvements around the queries Prisma executes, targeting [one-to-many relation fields](https://www.prisma.io/docs/concepts/components/prisma-schema/relations/one-to-one-relations) and [nested updates](https://www.prisma.io/docs/concepts/components/prisma-client/relation-queries#update-all-related-records-or-filter). ##### Use `LIMIT` in one-to-many relations on a single parent In cases where there is a single parent with a one-to-many relation included (`findFirst`, `findUnique`, `findMany({ take: 1 })`), we now utilize `LIMIT` at the database level to restrict the number of related items returned instead of retrieving all related items into memory and performing a `take` in memory. For situations where you have many related objects but only need a few, you should see a dramatic improvement in speed and memory usage. **Note**: we are still working on bringing this improvement to other parts of Prisma Client in upcoming releases. If multiple parent records are returned, the previous behavior is used. ##### Further improvements for nested writes Thanks to our introduction of using `RETURNING` in some cases in 5.1.0, we could now improve performance in nested writes by removing reload nodes. This will now result in one less query per relation traversed in a nested write. For more info, [check out the pull request](https://togithub.com/prisma/prisma-engines/pull/4108). ##### Prisma Client query ```tsx await prisma.post.update({ where: { id: 1 }, data: { comment: { update: { data: { body: "Updated comment body" } } } }, select: { id: true, title: true, } }) ``` ##### Before v5.2.0 ```sql SELECT "Post"."id", "Post"."title" FROM "Post" WHERE ("Post"."id" = $1 AND 1=1) LIMIT $2 OFFSET $3 SELECT "Post"."id", "Post"."userId" FROM "Post" WHERE "Post"."id" = $1 OFFSET $2 SELECT "User"."id" FROM "User" WHERE (1=1 AND "User"."id" IN ($1)) OFFSET $2 SELECT "User"."id" FROM "User" WHERE ("User"."id" = $1 AND 1=1) LIMIT $2 OFFSET $3 SELECT "User"."id", "User"."commentId" FROM "User" WHERE "User"."id" = $1 OFFSET $2 SELECT "Comment"."id" FROM "Comment" WHERE (1=1 AND "Comment"."id" IN ($1)) OFFSET $2 UPDATE "Comment" SET "body" = $1 WHERE ("Comment"."id" = $2 AND 1=1) RETURNING "Comment"."id" SELECT "Post"."id", "Post"."title" FROM "Post" WHERE "Post"."id" = $1 LIMIT $2 OFFSET $3 ``` ##### 5.2.0 and later ```sql SELECT "Post"."id", "Post"."title", "Post"."userId" FROM "Post" WHERE ("Post"."id" = $1 AND 1=1) LIMIT $2 OFFSET $3 SELECT "User"."id" FROM "User" WHERE (1=1 AND "User"."id" IN ($1)) OFFSET $2 SELECT "User"."id", "User"."commentId" FROM "User" WHERE ("User"."id" = $1 AND 1=1) LIMIT $2 OFFSET $3 SELECT "Comment"."id" FROM "Comment" WHERE (1=1 AND "Comment"."id" IN ($1)) OFFSET $2 UPDATE "Comment" SET "body" = $1 WHERE ("Comment"."id" = $2 AND 1=1) RETURNING "Comment"."id" SELECT "Post"."id", "Post"."title" FROM "Post" WHERE "Post"."id" = $1 LIMIT $2 OFFSET $3 ``` #### Fixes and improvements ##### Prisma Client - [CFW: Avoid including Query Engine when data proxy is enabled](https://togithub.com/prisma/prisma/issues/9597) - [Local Prisma Studio does not work with Data Proxy](https://togithub.com/prisma/prisma/issues/12734) - [Postinstall hook always generates non Data Proxy Prisma Client](https://togithub.com/prisma/prisma/issues/13608) - [`limit` is gone when `findUnique` with include relation ](https://togithub.com/prisma/prisma/issues/14499) - [`Cannot fetch data from service: include is not a function` Error while using Next.js with Data Proxy](https://togithub.com/prisma/prisma/issues/15395) - [`take` key doesn't work correctly for nested query that returns one item with its nested children](https://togithub.com/prisma/prisma/issues/15623) - [Prisma Client Edge: environment variables are not working with the "new" Module Worker syntax for Cloudflare Workers](https://togithub.com/prisma/prisma/issues/15958) - [Add documentation to "PrismaClient is unable to be run in the browser"](https://togithub.com/prisma/prisma/issues/16153) - [Change how Data Proxy Client deals with unsupported preview features](https://togithub.com/prisma/prisma/issues/17796) - [Custom Prisma Client output location breaks Prisma Data Proxy in NextJS](https://togithub.com/prisma/prisma/issues/18227) - [GetPayload type error since 4.16.1 "Two different types with this name exist, but they are unrelated."](https://togithub.com/prisma/prisma/issues/20422) - [Browser bundle: Unhandled Runtime Error when upgrading to 5.1.0 from 5.0.0 ](https://togithub.com/prisma/prisma/issues/20480) - [Prisma Client: `disconnect: true` does not appear to delete the foreign key in the returned data](https://togithub.com/prisma/prisma/issues/20491) - [Prisma Client errors with "TypeError: Cannot create proxy with a non-object as target or handler" when using result client extension with no `needs` and `count` method](https://togithub.com/prisma/prisma/issues/20499) - [Upgrading from Prisma 5.0.0 -> 5.1.0 results in "TS2321: Excessive stack depth comparing types" error using `mockDeep()`](https://togithub.com/prisma/prisma/issues/20516) - [Unnecessary reads for to-one nested updates](https://togithub.com/prisma/prisma/issues/20556) - [Better error message if `@prisma/client/edge` can not find environment variable](https://togithub.com/prisma/prisma/issues/20589) - [5.1: Alias for old name for `CountOutputTypeDefaultArgs` does not exist](https://togithub.com/prisma/prisma/issues/20614) - [Incorrect pagination for nested m2m chunked reads](https://togithub.com/prisma/prisma/issues/20624) ##### Prisma Migrate - [RustPanic on `prisma generate` when Unsupported field defined in a Composite type](https://togithub.com/prisma/prisma/issues/19694) - [Use PostgreSQL System Information Functions instead of manually joining fields](https://togithub.com/prisma/prisma/issues/19935) - [Duplicate expression index comment whenever db pull is run](https://togithub.com/prisma/prisma/issues/20386) #### Credits Huge thanks to [@​skyzh](https://togithub.com/skyzh), [@​alula](https://togithub.com/alula), [@​michaelpoellath](https://togithub.com/michaelpoellath), [@​RobertCraigie](https://togithub.com/RobertCraigie), [@​darthmaim](https://togithub.com/darthmaim), [@​Gerschtli](https://togithub.com/Gerschtli), [@​andyjy](https://togithub.com/andyjy), [@​mejiaej](https://togithub.com/mejiaej), [@​iurylippo](https://togithub.com/iurylippo), [@​mrazauskas](https://togithub.com/mrazauskas), [@​coder246](https://togithub.com/coder246), [@​RDIL](https://togithub.com/RDIL) for helping! ### [`v5.1.1`](https://togithub.com/prisma/prisma/releases/tag/5.1.1) [Compare Source](https://togithub.com/prisma/prisma/compare/5.1.0...5.1.1) Today, we are issuing the `5.1.1` patch release. #### Fixes in Prisma Client - [Browser bundle: Unhandled Runtime Error when upgrading to 5.1.0 from 5.0.0 ](https://togithub.com/prisma/prisma/issues/20480) - [Prisma Client: `disconnect: true` does not appear to delete the foreign key in the returned data](https://togithub.com/prisma/prisma/issues/20491) - [Prisma Client errors with "TypeError: Cannot create proxy with a non-object as target or handler" when using result client extension with no `needs` and `count` method](https://togithub.com/prisma/prisma/issues/20499) ### [`v5.1.0`](https://togithub.com/prisma/prisma/releases/tag/5.1.0) [Compare Source](https://togithub.com/prisma/prisma/compare/5.0.0...5.1.0) Today, we are excited to share the `5.1.0` stable release 🎉 🌟 **Help us spread the word about Prisma by starring the repo ☝️ or [tweeting](https://twitter.com/intent/tweet?text=Check%20out%20the%20latest%20@​prisma%20release%20v5.1.0%20%F0%9F%9A%80%0D%0A%0D%0Ahttps://github.com/prisma/prisma/releases/tag/5.1.0) about the release.** ### Highlights After two big releases where we released Client extensions for production usage ([`4.16.0`](https://togithub.com/prisma/prisma/releases/tag/4.16.0)) and made Prisma faster by default ([`5.0.0`](https://togithub.com/prisma/prisma/releases/tag/5.0.0)), we have focused on some smaller issues to make the experience with these new features even better. #### Community contributions Our community has been on the roll! We appreciate everyone who helps us by opening a GitHub issue or proposing a fix via Pull Requests. In this release, we're excited to highlight multiple community contributions: - Fix IPv6 not working for relational databases: [https://github.com/prisma/prisma-engines/pull/4051](https://togithub.com/prisma/prisma-engines/pull/4051) by [@​alula](https://togithub.com/alula) - Middlewares: Add to `PrismaAction` type, missing `findUniqueOrThrow` and `findFirstOrThrow` [https://github.com/prisma/prisma/pull/17471](https://togithub.com/prisma/prisma/pull/17471) by [@​mejiaej](https://togithub.com/mejiaej) and missing `groupBy` [https://github.com/prisma/prisma/pull/19985](https://togithub.com/prisma/prisma/pull/19985) by [@​iurylippo](https://togithub.com/iurylippo) - Better error message in currently non-supported runtimes like Browser or Vercel Edge Runtime [https://github.com/prisma/prisma/pull/20163](https://togithub.com/prisma/prisma/pull/20163) by [@​andyjy](https://togithub.com/andyjy) - Remove error messages for valid NixOS setups [https://github.com/prisma/prisma/pull/20

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

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

🔕 Ignore: Close this PR and you won't be reminded about these updates again.



This PR has been generated by Mend Renovate. View repository job log here.