Skip to content
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

chore: bump up prisma monorepo to v6 (major) #8964

Open
wants to merge 1 commit into
base: canary
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Nov 28, 2024

This PR contains the following updates:

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

Release Notes

prisma/prisma (@​prisma/client)

v6.0.1

Compare Source

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

⚠️ This section contains a list of breaking changes. If you upgrade your application to Prisma ORM v6 without addressing these, your application is going to break! For detailed upgrade instructions, check out the upgrade guide. ⚠️ 

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.

Usage of Buffer

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.

Removed NotFoundError

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.

New keywords that can't be used as model names: async, await, using

With this release, you can't use async, await and using as model names any more.


⚠️ For detailed upgrade instructions, check out the upgrade guide. ⚠️ 

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:

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.

prisma/prisma (@​prisma/instrumentation)

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

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

⚠️ This section contains a list of breaking changes. If you upgrade your application to Prisma ORM v6 without addressing these, your application is going to break! For detailed upgrade instructions, check out the upgrade guide. ⚠️ 

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.

Usage of Buffer

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.

Removed NotFoundError

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.

New keywords that can't be used as model names: async, await, using

With this release, you can't use async, await and using as model names any more.


⚠️ For detailed upgrade instructions, check out the upgrade guide. ⚠️ 

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:

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.

prisma/prisma (prisma)

v6.0.1

Compare Source

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

⚠️ This section contains a list of breaking changes. If you upgrade your application to Prisma ORM v6 without addressing these, your application is going to break! For detailed upgrade instructions, check out the upgrade guide. ⚠️ 

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.

Usage of Buffer

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.

Removed NotFoundError

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.

New keywords that can't be used as model names: async, await, using

With this release, you can't use async, await and using as model names any more.


⚠️ For detailed upgrade instructions, check out the upgrade guide. ⚠️ 

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:

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.


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.


  • If you want to rebase/retry this PR, check this box

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

@renovate renovate bot added the dependencies Pull requests that update a dependency file label Nov 28, 2024
Copy link

graphite-app bot commented Nov 28, 2024

Your org has enabled the Graphite merge queue for merging into canary

Add the label “merge” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix.

You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link.

Copy link

codecov bot commented Nov 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 36.09%. Comparing base (055abf6) to head (0c06b7a).

Additional details and impacted files
@@             Coverage Diff             @@
##           canary    #8964       +/-   ##
===========================================
- Coverage   65.71%   36.09%   -29.62%     
===========================================
  Files         715      475      -240     
  Lines       41035    11956    -29079     
  Branches     4008     2271     -1737     
===========================================
- Hits        26965     4316    -22649     
+ Misses      13641     7275     -6366     
+ Partials      429      365       -64     
Flag Coverage Δ
server-test ?
unittest 36.09% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch from b3c573c to 0c8ec1e Compare December 12, 2024 07:53
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch from 0c8ec1e to 0c06b7a Compare December 13, 2024 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app:server dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants