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

Upgrade Prisma from 5.20.0 to 6.2.0 #11888

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

Philzen
Copy link
Contributor

@Philzen Philzen commented Jan 8, 2025

See https://www.prisma.io/docs/orm/more/upgrade-guides/upgrading-versions/upgrading-to-prisma-6

Especially 6.2 brings exciting new features, most importantly json and enum fields for SQLite, but also the omit-feature (the antagonist to include), the updateManyAndReturn batch function, or the support for auto-generated cuid2 and ulid values.

For a quick overview of the new features and improvements since 5.20, refer to the release notes:

This is, of course, a candidate for the next major version of RedwoodJS. The migration process looks smooth, we should never- theless start on a writeup to highlight the new features and the most important migration steps.

@Philzen Philzen marked this pull request as draft January 8, 2025 03:04
@Tobbe
Copy link
Member

Tobbe commented Jan 8, 2025

Thanks for getting started on this. Very exciting! Would love to be able to upgrade to the latest Prisma version

See https://www.prisma.io/docs/orm/more/upgrade-guides/upgrading-versions/upgrading-to-prisma-6

Especially 6.2 brings exciting new features, most importantly `json`
and `enum` fields for SQLite, but also the `omit`-feature (the
antagonist to `include`), the `updateManyAndReturn` batch function,
or the support for auto-generated cuid2 and ulid values.

For a quick overview of the new features, refer to the release notes:
- https://github.com/prisma/prisma/releases/tag/6.2.0
- https://github.com/prisma/prisma/releases/tag/6.1.0
- https://github.com/prisma/prisma/releases/tag/6.0.0

This is, of course, a candidate for the next major version of
RedwoodJS. The migration process looks smooth, we should never-
theless start on a writeup to highlight the new features and
the most important migration steps.
@Philzen Philzen marked this pull request as ready for review January 8, 2025 09:01
@Philzen
Copy link
Contributor Author

Philzen commented Jan 8, 2025

This was a whole lot simpler than expected :)

Also yarn rwfw'd my main project against this branch which worked without any hiccups.

@Philzen Philzen force-pushed the chore/update-prisma-to-v6.2 branch from 9bef774 to 829d89c Compare January 8, 2025 09:07
@Tobbe Tobbe added the release:breaking This PR is a breaking change label Jan 10, 2025
@Tobbe Tobbe added this to the next-release-major milestone Jan 10, 2025
@Tobbe
Copy link
Member

Tobbe commented Jan 10, 2025

Looking at the breaking changes for Prisma v6 this one stood out to me

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.

I'm worried/concerned about how that might affect the Prisma <-> GQL type mapping. Might be a non-issue. But I'd like us to look into at least, before we merge this PR.

And we should also think about any codemods we could write for any of the breaking changes they've listed.
And of course what our release and update notes should be for this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:breaking This PR is a breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants