-
Notifications
You must be signed in to change notification settings - Fork 2
fix(deps): update prisma monorepo to v6 (major) #146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
renovate
wants to merge
1
commit into
main
Choose a base branch
from
renovate/major-prisma-monorepo
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
f00e1fd
to
cd005d2
Compare
cd005d2
to
c362ec3
Compare
ab6d248
to
0b391d2
Compare
8af820a
to
23f65db
Compare
23f65db
to
8afe4cd
Compare
b053ffa
to
ef21269
Compare
7727dd6
to
29499ff
Compare
173f08b
to
047b23e
Compare
047b23e
to
c8eeef5
Compare
1a6c138
to
6341d23
Compare
0b21b4e
to
12d60c4
Compare
fdc8b91
to
599e236
Compare
599e236
to
c12d169
Compare
44e7452
to
57ccd71
Compare
8b9ce23
to
93484a4
Compare
b51488a
to
45e96ea
Compare
45e96ea
to
a8b5809
Compare
a8b5809
to
006d3f1
Compare
006d3f1
to
743ea83
Compare
0158c73
to
f648b1b
Compare
f648b1b
to
00455fc
Compare
4987120
to
4b36824
Compare
38b4277
to
a3d4830
Compare
a3d4830
to
68ad88d
Compare
68ad88d
to
e745ed3
Compare
e745ed3
to
064f998
Compare
064f998
to
cd8966c
Compare
682fd17
to
46a25dc
Compare
4d6eac7
to
77de989
Compare
77de989
to
47d4116
Compare
6d54b9a
to
0949fa8
Compare
0949fa8
to
501d27c
Compare
c2be72d
to
1b1d944
Compare
1b1d944
to
0afc8a8
Compare
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.
This PR contains the following updates:
3.15.2
->6.8.2
3.15.2
->6.8.2
Release Notes
prisma/prisma (@prisma/client)
v6.8.2
Compare Source
Today, we are issuing the 6.8.2 patch release. It fully resolves an issue with the
prisma init
andprisma dev
commands for some Windows users who were still facing problems after the previous incomplete fix in version 6.8.1.Fixes:
v6.8.1
Compare Source
Today, we are issuing the 6.8.1 patch release. It fixes an issue with the
prisma init
andprisma dev
commands on windows.Fixes
v6.8.0
Compare Source
Today, we are excited to share the
6.8.0
stable release 🎉🌟 Help us spread the word about Prisma by starring the repo ☝️ or posting on X about the release.
Highlights
Local development with Prisma Postgres via
prisma dev
(Early Access)In this release, we're releasing a way to develop against Prisma Postgres locally — no Docker required!
To get started, run the new
prisma dev
command:npx prisma dev # starts a local Prisma Postgres server
This command spins up a local Prisma Postgres instance and prints the connection URL that you'll need to set as the
url
of yourdatasource
block to point to a local Prisma Postgres instance. It looks similar to this:You can then run migrations and execute queries against this local Prisma Postgres instance as with any remote one. Note that you need to keep the
prisma dev
process running in order to interact with the local Prisma Postgres instance.📚 Learn more in the docs.
Native Deno support in
prisma-client
generator (Preview)In this release, we're removing the
deno
Preview feature from theprisma-client-js
generator. If you want to use Prisma ORM with Deno, you can now do so with the newprisma-client
generator:📚 Learn more in the docs.
VS Code Agent Mode: AI support with your database workflows
Have you tried agent mode in VS Code already?
"The agent acts as an autonomous pair programmer that performs multi-step coding tasks at your command, such as analyzing your codebase, proposing file edits, and running terminal commands."
As of this release, your agent is capable of supporting you with your database workflows more than ever! If you're using VS Code and have the Prisma VS Code extension installed, your agent now is able to help you with your database workflows, such as:
All you need to do is make sure you're using the latest version of Prisma's VS Code extension and your agent is ready to go 🚀
📚 Learn more in the docs.
Other news
You voted, we acted: New Singapore region for Prisma Postgres
We recently ran a poll where we asked you which region you'd like to see next for Prisma Postgres. The majority vote went to Asia Pacific (Singapore), so as of today, you're able to spin up new Prisma Postgres instances in the
ap-southeast-1
region.We're not stopping here — keep an eye out on X for another poll asking for your favorite regions that we should add!
v6.7.0
Compare Source
Today, we are excited to share the
6.7.0
stable release 🎉🌟 Help us spread the word about Prisma by starring the repo ☝️ or posting on X about the release.
Highlights
Prisma ORM without Rust engines (Early Access)
If you're a regular visitor of our company blog, you may already know that we're currently working on moving the core of Prisma from Rust to TypeScript. We have written extensively about why we're moving away from Rust and already shared the first measurements of performance boosts we saw from the re-write.
This re-write is not just a move from one programming language to another. It fundamentally improves the architecture of Prisma ORM and replaces the Query Engine (which is written in Rust and deployed as a standalone binary) with a much leaner and more efficient approach that we call Query Compiler.
In this release, we're excited to give you Early Access to the new Query Compiler for PostgreSQL and SQLite database 🥳 Support for more database will follow very soon!
To use the new "Rust-free" version of Prisma ORM, add the
queryCompiler
(new) anddriverAdapters
feature flags to your client generator:Now run
prisma generate
to re-generate Prisma Client. If you didn't use a driver adapter before, you'll need to install one. For example, the one for PostgreSQL:Once installed, you can instantiate
PrismaClient
as follows:This version of
PrismaClient
doesn't have a Query Engine binary and you can use it in the exact same way as before.📚 Learn more in the docs.
Support for
better-sqlite3
JavaScript driver (Preview)Driver adapters are Prisma ORM's way of letting you use JS-native drivers (like
pg
) to interact with your database. In this release, we're introducing a new driver adapter for using thebetter-sqlite3
package, so you can now interact with SQLite database in a JS-native way.To use it, first enable the
driverAdapters
Preview feature flag in on your clientgenerator
, then install these libraries:Now you can instantiate Prisma Client as follows:
📚 Learn more in the docs.
Multi-file Prisma schemas are now production-ready
The
prismaSchemaFolder
Preview feature is moving into General Availability 🎉 With that change, Prisma ORM now by default supports splitting your Prisma schema file and e.g. lets you organize your schema as follows:prisma/schema.prisma
→ defines data source and generatorprisma/models/posts.prisma
→ definesPost
modelprisma/models/users.prisma
→ definesUser
modelprismaSchemaFolder
Preview feature in the last 6.6.0 release. If you've been using this feature to split your Prisma schema, make sure to read the release notes and update your project accordingly.📚 Learn more in the docs.
Splitting generated output with new
prisma-client
generator (Preview)With the
prisma-client-js
generator, the generated Prisma Client library is put into a singleindex.d.ts
file. This sometimes led to issues with large schemas where the size of the generated output could slow down code editors and breaking auto-complete.As of this release, our new
prisma-client
generator (that was released in 6.6.0) now splits the generated Prisma Client library into multiple files and thus avoids the problems of a single, large output file.Also: As a bonus, we now ensure that generated files do not raise any ESLint and TypeScript errors!
Before
After
📚 Learn more in the docs.
Company news
Our team has been busy shipping more than just the ORM! Check out these articles to learn what else we've been up to recently:
v6.6.0
Compare Source
Today, we are excited to share the
6.6.0
stable release 🎉 This version comes packed with exciting features, we can't wait to see what you're going to build with it! Read our announcement blog post for more details: Prisma ORM 6.6.0: ESM Support, D1 Migrations & MCP Server🌟 Help us spread the word about Prisma by starring the repo ☝️ or posting on X about the release. 🌟
Highlights
ESM support with more flexible
prisma-client
generator (Early Access)We are excited to introduce a new
prisma-client
generator that's more flexible, comes with ESM support and removes any magic behaviours that may cause friction with the currentprisma-client-js
generator.Here are the main differences:
output
path; no “magic” generation intonode_modules
any moremoduleFormat
fieldHere's how you can use the new
prisma-client
generator in your Prisma schema:In your application, you can then import the
PrismaClient
constructor (and anything else) from the generated folder:output
path to.gitignore
so that the query engine that's part of the generated Prisma Client is kept out of version control:### .gitignore ./src/generated/prisma
📚 Learn more in the docs.
Cloudflare D1 & Turso/LibSQL migrations (Early Access)
Cloudflare D1 and Turso are popular database providers that are both based on SQLite. While you can query them using the respective driver adapter for D1 or Turso, previous versions of Prisma ORM weren't able to make schema changes against these databases.
With today's release, we're sharing the first Early Access version of native D1 migration support for the following commands:
prisma db push
: Updates the schema of the remote database based on your Prisma schemaprisma db pull
: Introspects the schema of the remote database and updates your local Prisma schemaprisma migrate diff
: Outputs the difference between the schema of the remote database and your local Prisma schemaTo use these commands, you need to connect the Prisma CLI to your D1 or Turso instance by using the driver adapter in your
prisma.config.ts
file. Here is an example for D1:With that setup, you can now execute schema changes against your D1 instance by running:
📚 Learn more in the docs:
MCP server to manage Prisma Postgres via LLMs (Preview)
Prisma Postgres is the first serverless database without cold starts. Designed for optimal efficiency and high performance, it's the perfect database to be used alongside AI tools like Cursor, Windsurf, Lovable or co.dev. In this ORM release, we're adding a command to start a Prisma MCP server that you can integrate in your AI development environment. Thanks to that MCP server, you can now:
… and much more.
To get started, add this snippet to the MCP configuration of your favorite AI tool and get started:
📚 Learn more in the docs.
New
--prompt
option onprisma init
You can now pass a
--prompt
option to theprisma init
command to have it scaffold a Prisma schema for you and deploy it to a fresh Prisma Postgres instance:For everyone, following social media trends, we also created an alias called
--vibe
for you 😉Improved API for using driver adapters
In this release, we are introducing a nice DX improvement for driver adapters. Driver adapters let you access your database using JS-native drivers with Prisma ORM.
Before 6.6.0
Earlier versions of Prisma ORM required you to first instantiate the driver itself, and then use that instance to create the Prisma driver adapter. Here is an example using the
@libsql/client
driver for LibSQL:6.6.0 and later
As of this release, you instantiate the driver adapter directly with the options of your preferred JS-native driver.:
Other changes
prismaSchemaFolder
breaking changesIf you are using the
prismaSchemaFolder
Preview feature to split your Prisma schema into multiple files, you may encounter some breaking changes in this version.Explicit declaration of schema folder location
You now must always provide the path to the schema folder explicitly. You can do this in either of three ways:
--schema
option to your Prisma CLI command (e.g.prisma migrate dev --schema ./prisma/schema
)prisma.schema
field inpackage.json
:schema
property inprisma.config.ts
:migrations
folder must live next to.prisma
file withdatasource
blockYour
migrations
directory must live next to the.prisma
file that defines yourdatasource
blog. If you relied on the implicit schema folder location of./prisma/schema
make sure to move your migrations folder from./prisma/migrations
to./prisma/schema/migrations
.Assuming
schema.prisma
defines thedatasource
in this example, here's how how need to place themigrations
folder:See this PR for more details.
No more Bun issues if Node.js is not installed
Bun users reported an issue that
prisma generate
would hang if Node.js installed on their machine. This is now fixed and Bun users can generate Prisma Client without issues.Company news
Enterprise support
Prisma offers an enterprise support plan for Prisma ORM. Get direct help from our team and a joint slack channel! With Prisma ORM 7 on the horizon, this is a great time to upgrade your support today.
We are hiring: Developer Support Engineer
If you care about making developers successful, join us as a Developer Support Engineer.
v6.5.0
Compare Source
Today, we are excited to share the
6.5.0
stable release 🎉🌟 Help us spread the word about Prisma by starring the repo ☝️ or tweeting about the release. 🌟
Highlights
Databases can only be reset manually and explicitly
In previous versions, if Prisma ORM determined that a
migrate
command could not be applied cleanly to the underlying database, you would get a message like this one:While "no" was the default, we've determined that having this prompt in the first place was a mistake. In this version we're removing the prompt entirely and instead exiting with an appropriate error message.
To get the previous behavior, you will need to run
prisma migrate reset
directly.Support for
prisma.config.ts
in Prisma StudioWe've expanded support for our
prisma.config.ts
file to include Prisma Studio!To use the new config file, including the ability to connect to driver adapter enabled databases with Prisma Studio, add a
studio
block to yourprisma.config.ts
file:Notice how this looks a little different from last release! Instead of an
@prisma/config
package there’s now two different options:defineConfig
helper exported byprisma/config
.PrismaConfig
utility type exported byPrisma
.All the relevant info for the
prisma.config.ts
file, including these new ways of defining your config, can be found in our docs.Allow for chaining
$on
and$extends
.In previous versions of Prisma ORM, the return type of the
$on
client method wasvoid
. This did not allow for chaining$on()
and$extends()
calls, as$on
is not available on extended clients.In this version we've resolved this issue and
$on
will now return the modified Prisma Client.Community fixes
We have a number of community-submitted fixes that improve Prisma ORM:
Prisma is hiring
Join us at Prisma and work on our TypeScript ORM (now faster than ever) and our Cloud products like Prisma Postgres (now in GA!)
We currently have two open roles in our Engineering team:
If these don’t fit, you can still check out our jobs page and send a general application.
Enterprise support
Prisma offers an enterprise support plan for Prisma ORM. Get direct help from our team and a joint slack channel! With Prisma ORM 7 on the horizon this is a great time to upgrade your support today.
Credits
Thank you to @overbit, @RaHehl, @toniopelo, and @de-novo for your contributions to this release!
v6.4.1
Compare Source
Today, we are issuing the 6.4.1 patch release. It fixes a few issues with the NPS survey and makes it respect the
--no-hints
CLI flag.Fixes
Prisma CLI
v6.4.0
Compare Source
Today, we are excited to share the
6.4.0
stable release 🎉🌟 Help us spread the word about Prisma by starring the repo ☝️ or tweeting about the release. 🌟
Highlights
TypeScript-based configuration with
prisma.config.ts
(Early Access)In this release, we're introducing an Early Access version of a TypeScript-based configuration file for Prisma ORM:
prisma.config.ts
.This file will serve as a central configuration point for Prisma ORM:
With this file you are able to run any arbitrary code needed to get values required by Prisma ORM, such as database URLs from a secret store or fine-grained control of settings. It needs to live in the current working directory from where you're executing Prisma CLI commands (typically, the root of your project).
Learn more about the new
prisma.config.ts
file in the docs.Case-insensitive mode in JSON filters
You can now do case-insensitive filtering on JSON data.
Just use the new
mode
option when filtering usingstring_contains
,string_starts_with
orstring_ends_with
in a JSON object and set it to"insensitive"
:The above query returns all users where the
favorites.catBreed
value contains"Van"
or"van"
.Thanks to @lubosmato who implemented this feature 🎉
Improved CockroachDB migration speed
In this release we found some inefficiencies in our migration engine that was impacting CockroachDB migrations. In 6.4.0, CockroachDB migrations should be significantly faster.
Calling all devs: Give us your feedback!
Prisma ORM's community keeps us going. To make sure that we're focused on what the community needs, we would like to get your feedback via our online feedback form.
Credits
Huge thanks to @lubosmato, @notomo, @Mayureshd-18, @mydea, @omar-dulaimi and @Hazmi35 for helping out with this release!
v6.3.1
Compare Source
This patch releases introduces improvements to the
prisma init
output when invoked to with the--db
option.Run
npx prisma@latest init --db
to get an instant Prisma Postgres database.v6.3.0
Compare Source
Today, we are excited to share the
6.3.0
stable release 🎉🌟 Help us spread the word about Prisma by starring the repo ☝️ or tweeting about the release. 🌟
Highlights
A brand new Prisma Studio
In this release we've included several great improvements to Prisma Studio's developer experience. You can learn all about the changes we've made in our release blog post, but here's a short list:
Prisma Studio is back in the Console
Fans of Prisma Data Browser rejoice! The new Prisma Studio is now in the Prisma Console and is available for all PostgreSQL and MySQL databases.
A new model viewer
Previously, switching from model to model in Prisma Studio would require backing all the way out to the model view, then digging in again. With our new UI, it's easy to switch from model to model while keeping your place.
A new editing experience
If you're trying to edit a given field in a model, Prisma Studio made it quite easy. However, if you're trying to edit every field in a given row, it could get quite annoying to keep scrolling left to right. Our new edit sidebar resolves that with the ability to edit all fields for a given row at once.
Clean up at the click of a button
When editing a number of models, it can get difficult to get back to a clean slate. In the new Prisma Studio, we've added a "Close all" button that puts you back to a fresh start.
Add
limit
toupdateMany()
anddeleteMany()
Previously,
limit
has not existed as a valid option in top levelupdateMany()
anddeleteMany()
queries. In 6.3.0limit
is now available in these queries, bringing their features more in line with other query types.You can use
limit
like the following:This will limit the number of deleted users to 100 at maximum.
Sort
generator
fields deterministicallyIn previous version of Prisma ORM, the fields inside of a
generator
block in your Prisma Schema were not deterministically sorted. This could lead to cases whereprisma db pull
could lead to re-ordering of fields.In 6.3.0, the sorting of fields in this block is now deterministic. You may see re-ordering on the first
prisma db pull
after you upgrade, but it will remain consistent afterwards.Replace
NOT IN
withNOT EXISTS
for PostgreSQL relation filtersIn previous versions of Prisma ORM, when using the
none
orsome
relation filters, the SQL queries generated usedNOT IN
. In many cases this lead to performance issues as the size of the related table grew. In 6.3.0, we’ve replaced these usages ofIN
withEXISTS
in order to improve query performance.A special thank you
We'd like to extend our heartfelt thanks to @loren and his team for the collaboration and trust in our enterprise support plan. Working closely with them allowed us to address important issues like #19249 and #17303. Their insights and partnership have been invaluable in improving our product.
If your team could benefit from dedicated support and tailored solutions, learn more about our enterprise support plan.
Fixes and improvements
Prisma Client
take
orlimit
toupdateMany()
&deleteMany()
Prisma
prisma db pull
non-deterministically sorts generator fieldsno entry found for key
error on views<->model relationsonUpdate
data to the DMMF in@prisma/generator-helper
Credits
Huge thanks to @WhyAsh5114 for their contributions to this release!
v6.2.1
Compare Source
Today we are releasing the 6.2.1 patch release to address an issue with some of the
omitApi
preview feature checks having been accidentally omitted when making the feature GA. Now it is fully functional without the preview feature flag.Changes
v6.2.0
Compare Source
Today we're releasing Prisma ORM version 6.2.0 🎉
🌟 Help us spread the word about Prisma by starring the repo or tweeting about the release. 🌟
We have a number of new features in this version, including support for
json
andenum
fields in SQLite, a newupdateManyAndReturn
function, support for ULID values, as well as the promotion of theomit
feature from Preview to Generally Availability.Highlights
Excluding fields via
omit
is now production-readyOur number one requested feature is out of Preview and Generally Available. In 6.2.0, you no longer need to add
omitApi
to your list of Preview features:generator client { provider = "prisma-client-js" - previewFeatures = ["omitApi"] }
As a refresher:
omit
allows you to exclude certain fields from being returned in the results of your Prisma Client queries.You can either do this locally, on a per-query level:
Or globally, to ensure a field is excluded from all queries of a certain model:
For more information on
omit
, be sure to check our documentation.json
andenum
fields in SQLitePrevious to this version, you could not define
json
andenum
fields in your Prisma schema when using SQLite. The respective GitHub issues have been among the most popular ones in our repo, so with our new approach to open-source governance, we finally got to work and implemented these.Working with JSON and Enum fields works similarly to other database providers, here’s an example:
Support for auto-generated ULID values
Similar to
cuid2
support released in ORM version 6.0.0, we are now adding support for Universally Unique Lexicographically Sortable Identifiers (or short: ULIDs 😄) in version 6.2.0. A ULID value is a 26-character alphanumeric string, e.g.01GZ0GZ3XARH8ZP44A7TQ2W4ZD
.With this new feature, you can now create records with auto-generated ULID values for
String
fields:New batch function:
updateManyAndReturn
updateMany
allows you to update many records in your database, but it only returns the count of the affected rows, not the resulting rows themselves. WithupdateManyAndReturn
you are now able to achieve this:This call to
updateManyAndReturn
will now return the actual records that have been updated in the query:Please note that like
createManyAndReturn
,updateManyAndReturn
is only supported in PostgreSQL, CockroachDB, and SQLite.Fixed runtime error in Node.js v23
While not officially supported, we understand that a lot of you like to be on the latest Node.js version — so we fixed an error that only occurred on Node.js 23. Happy coding ✌️
Prisma is hiring 🤝
Join us at Prisma to work on the most popular TypeScript ORM and other exciting products like the first serverless database built on unikernels!
We currently have two open roles in our Engineering team:
If these don’t fit, you can still check out our jobs page and send a general application.
v6.1.0
Compare Source
Today we're releasing Prisma ORM version 6.1.0
In this version our
tracing
Preview feature is being graduated to GA!Highlights
Tracing goes GA
The
tracing
Preview feature is now stable. You now no longer have to includetracing
in your set of enabled preview features.generator client { provider = "prisma-client-js" - previewFeatures = ["tracing"] }
We have also changed some of the spans generated by Prisma Client. Previously, a trace would report the following spans:
Now, the following are reported:
Additionally, we have made a few changes to our dependencies:
@opentelemetry/api
is now a peer dependency instead of a regular dependencyregisterInstrumentations
in@opentelemetry/instrumentation
is now re-exported by@prisma/instrumentation
After upgrading to Prisma ORM 6.1.0 you will need to add
@opentelemetry/api
to your dependencies if you haven't already:You will also no longer need to have
@opentelemetry/instrumentation
if you only useregisterInstrumentations
. In this case you can importregisterInstrumentations
from@prisma/instrumentation
Mutli-line comments in Prisma Schema Language (PSL)
Comments can now be defined as multi-line in your Prisma schema! Comments can use the existing format:
// this is a schema comment
or can now also use our multi-line format:
Bug fixes
Tracing related
As we're moving our
tracing
preview to GA, a number of issues have been resolved. Here are a few highlights:suppressTracing
Other issues
We also have a number of other issues that were resolved outside of our
tracing
feature.PrismaNeonHTTP
adapterfindUnique
returnsnull
when used instead ofPromise.all
Fixes and improvements
Prisma
TypeError: parentTracer.getSpanLimits is not a function
Span
constructorprisma:engine
spans do not respectsuppressTracing()
tracing: engine
spans don't pass throughSampler
prisma:client:operation
prisma:engine
spans are missing when there are multiplenew PrismaClient()
invocationsparentTracer.getSpanLimits is not a function
opentelemetry-sdk-trace-base
(e.g. Datadog tracer)traceparent
comments with multiple SQL statements@prisma/instrumentation
dependencies peer dependenciesdb.statement
attribute doesn't include thetraceparent
commentregisterInstrumentations
uses the global provider instead of the one passed inPrismaNeonHTTP
adapter breaks on some types e.g. timestampPrisma failed to detect the libssl/openssl version to use
Prisma Client
@prisma/instrumentation
Type Error:'InstrumentionNodeModuleDefintion' is not generic
v6.0.1
Compare Source
Today we are releasing the
6.0.1
patch release to address an issue with using Prisma Client generated in a custom output path with Next.js.Changes
"type": "commonjs"
addition in generatedpackage.json
v6.0.0
Compare Source
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.
🌟 Help us spread the word about Prisma by starring the repo ☝️ or posting on X about the release.
Breaking changes
Minimum supported Node.js versions
The new minimum supported Node.js versions for Prisma ORM v6 are:
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
andB
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 newfullTextSearchPostgres
Preview feature.Usage of
Buffer
Prisma v6 replaces the usage of
Buffer
withUint8Array
to represent fields of typeBytes
. Make sure to replace all your occurrences of theBuffer
type with the newUint8Array
.Removed
NotFoundError
In Prisma v6, we removed the
NotFoundError
in favor ofPrismaClientKnownRequestError
with error codeP2025
infindUniqueOrThrow()
andfindFirstOrThrow()
. If you've relied on catchingNotFoundError
instances in your code, you need to adjust the code accordingly.New keywords that can't be used as model names:
async
,await
,using
With this release, you can't use
async
,await
andusing
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 thepreviewFeatures
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 thepreviewFeatures
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
:New features
We are also releasing new features with this release:
prisma generate
's outputCompany 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
Compare Source
Today, we are excited to share the
5.22.0
stable release 🎉🌟 Help us spread the word about Prisma by starring the repo ☝️ or posting on X about the 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 V
Configuration
📅 Schedule: Branch creation - "before 12pm on Sunday" (UTC), 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 was generated by Mend Renovate. View the repository job log.