fix(deps): update prisma monorepo to v6 (major)
This MR contains the following updates:
Package | Type | Update | Change |
---|---|---|---|
@prisma/client (source) | dependencies | major | ^5.9.0 -> ^6.0.0 |
prisma (source) | devDependencies | major | ^5.22.0 -> ^6.0.0 |
⚠️ WarningSome dependencies could not be looked up. Check the Dependency Dashboard for more information.
Release Notes
prisma/prisma (@prisma/client)
v6.0.0
We’re excited to share the Prisma ORM v6 release today
As this is a major release, it includes a few breaking changes that may affect your application. Before upgrading, we recommend that you check out our upgrade guide to understand the impact on your application.
If you want to have an overview of what we accomplished since v5, check out our announcement blog post: Prisma 6: Better Performance, More Flexibility & Type-Safe SQL.
Breaking changes
Minimum supported Node.js versions
The new minimum supported Node.js versions for Prisma ORM v6 are:
- for Node.js 18 the minimum supported version is 18.18.0
- for Node.js 20 the minimum supported version is 20.9.0
- for Node.js 22 the minimum supported version is 22.11.0
There is no official support for Node.js <18.18.0, 19, 21, 23.
Minimum supported TypeScript version
The new minimum supported TypeScript version for Prisma ORM v6 is: 5.1.0.
Schema change for implicit m-n relations on PostgreSQL
If you're using PostgreSQL and are defining implicit many-to-many relations in your Prisma schema, Prisma ORM maintains the relation table for you under the hood. This relation table has A
and B
columns to represent the tables of the models that are part of this relation.
Previous versions of Prisma ORM used to create a unique index on these two columns. In Prisma v6, this unique index is changing to a primary key in order to simplify for the default replica identity behaviour.
If you're defining implicit m-n relations in your Prisma schema, the next migration you'll create will contain ALTER TABLE
statements for all the relation tables that belong to these relations.
Full-text search on PostgreSQL
The fullTextSearch
Preview feature is promoted to General Availability only for MySQL. This means that if you're using PostgreSQL and currently make use of this Preview feature, you now need to use the new fullTextSearchPostgres
Preview feature.
Buffer
Usage of Prisma v6 replaces the usage of Buffer
with Uint8Array
to represent fields of type Bytes
. Make sure to replace all your occurrences of the Buffer
type with the new Uint8Array
.
NotFoundError
Removed In Prisma v6, we removed the NotFoundError
in favor of PrismaClientKnownRequestError
with error code P2025
in findUniqueOrThrow()
and findFirstOrThrow()
. If you've relied on catching NotFoundError
instances in your code, you need to adjust the code accordingly.
async
, await
, using
New keywords that can't be used as model names: With this release, you can't use async
, await
and using
as model names any more.
Preview features promoted to General Availability
In this release, we are promoting a number of Preview features to General Availability.
fullTextIndex
If you use the full-text index feature in your app, you can now remove fullTextIndex
from the previewFeatures
in your Prisma schema:
generator client {
provider = "prisma-client-js"
- previewFeatures = ["fullTextIndex"]
}
fullTextSearch
If you use the full-text search feature with MySQL in your app, you can now remove fullTextSearch
from the previewFeatures
in your Prisma schema:
generator client {
provider = "prisma-client-js"
- previewFeatures = ["fullTextSearch"]
}
If you are using it with PostgreSQL, you need to update the name of the feature flag to fullTextSearchPostgres
:
generator client {
provider = "prisma-client-js"
- previewFeatures = ["fullTextSearch"]
+ previewFeatures = ["fullTextSearchPostgres"]
}
New features
We are also releasing new features with this release:
- cuid2() support
- Include unused enum definitions in
prisma generate
's output - Improved compatibility with Deno 2
Company news
🚀 Prisma Postgres is free during Early Access
In case you missed it: We recently launched Prisma Postgres, a serverless database with zero cold starts, a generous free tier, connection pooling, real-time events, and a lot more! It’s entirely free during the Early Access phase, try it now!
✨ Let us know what you think of Prisma ORM
We're always trying to improve! If you've recently used Prisma ORM, we'd appreciate hearing your thoughts about your experience via this 2min survey.
v5.22.0
Today, we are excited to share the 5.22.0
stable release
Highlights
Further Tracing Improvements
In our ongoing effort to stabilize the tracing
Preview feature, we’ve made our spans compliant with OpenTelemetry Semantic Conventions for Database Client Calls. This should lead to better compatibility with tools such as DataDog and Sentry.
We’ve also included numerous bug fixes that should make this Preview feature easier to work with.
Metrics bug fix
Occasionally, connection pool metrics would become negative or grow unbounded. In this release, connection pool metrics should stay consistent.
Connection Pool Timeout fix
In a specific case, there could be issues where fetching a new connection from the connection pool would time out, regardless of the state of the application and connection pool. If you have experience connection pool issues accessing a PostgreSQL database with TLS encryption in a resource-constrained environment (such as Function-as-a-Service offerings or very small VPS) this should resolve those issues.
Special thanks to @youxq for their pull request and help resolving this issue!
Join us
Looking to make an impact on Prisma in a big way? We're hiring!
Learn more on our careers page: https://www.prisma.io/careers
Fixes and improvements
Prisma Migrate
Prisma
- Prisma generate randomly fails on Ubuntu due to missing internal .so
libquery_engine-debian-openssl-1.1.x.so.node
- Timed out fetching a new connection from the connection pool.
- Some
prisma:engine:connection
spans have no parent - Query-related spans outside of
prisma:engine:itx_runner
are disconnected from the tree - Tracing with dataproxy/mini-proxy:
itx_runner
span and it's children are missing sometimes - Incorrect OpenTelemetry span reported by Prisma
- OTEL spans are not recognised as spans from a database
- SQL Injection bug - D1 adaptor throws "Conversion failed: expected a datetime string in column" when string column contains any ISO date
- Prisma generate randomly fails on Ubuntu due to missing internal .so
libquery_engine-debian-openssl-1.1.x.so.node
Credits
Huge thanks to @tmm1, @Takur0, @hinaloe, @andyjy, and @youxq for helping!
Configuration
-
If you want to rebase/retry this MR, check this box
This MR has been generated by Renovate Bot.