-
Notifications
You must be signed in to change notification settings - Fork 1k
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
base: main
Are you sure you want to change the base?
Conversation
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.
A feature that was introduced with Prisma v6.0 See prisma/prisma-engines#5009 and prisma/prisma#25722
This was a whole lot simpler than expected :) Also |
9bef774
to
829d89c
Compare
Looking at the breaking changes for Prisma v6 this one stood out to me
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. |
That's a great catch that seems to definitely apply – I did a little scan and started a checklist in the PR description, not sure if that is the best medium to do this in a structured manner (if you have the access rights to edit it, that would be sort of practical). The necessary changes seem obvious. but i would love someone to do it who can also end-to-end test these and knows what they're doing. 😉 |
I do 🙂 ✏️
Not me! 😅 |
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
andenum
fields for SQLite, but also theomit
-feature (the antagonist toinclude
), theupdateManyAndReturn
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.
TODOs:
Buffer
s toUint8Array
sredwood/packages/cli/src/commands/generate/service/service.js
Lines 69 to 70 in 1260433
redwood/packages/cli/src/commands/generate/service/service.js
Line 165 in 1260433
redwood/packages/cli/src/commands/generate/service/templates/test.ts.template
Line 32 in 1260433
redwood/packages/cli/src/commands/generate/helpers.js
Line 313 in 1260433
redwood/packages/internal/src/__tests__/graphqlCodeGen.test.ts
Line 95 in 1260433
redwood/packages/internal/src/generate/graphqlCodeGen.ts
Line 295 in 1260433
redwood/packages/auth-providers/dbAuth/api/src/DbAuthHandler.ts
Line 1056 in 1260433
redwood/packages/auth-providers/dbAuth/api/src/__tests__/DbAuthHandler.fetch.test.js
Line 2234 in 1260433
redwood/packages/auth-providers/dbAuth/api/src/__tests__/DbAuthHandler.fetch.test.js
Line 2502 in 1260433
redwood/packages/auth-providers/dbAuth/api/src/__tests__/DbAuthHandler.test.js
Line 603 in 1260433
redwood/packages/auth-providers/dbAuth/api/src/__tests__/DbAuthHandler.test.js
Line 2050 in 1260433
redwood/packages/auth-providers/dbAuth/api/src/__tests__/DbAuthHandler.test.js
Line 2299 in 1260433
Buffer
are not prisma-relatedBuffer
inputs on any byte datatypesenum
andJSON
field type support for SQLiteomit
cuid2
andulid
values