wasp
wasp copied to clipboard
Migrate to latest Prisma
Two biggest changes since 4.12 to take into account:
- Prisma now has "client extensions" feature, that enables hooking into various parts of Prisma Client. It replaces Prisma client middleware, which therefore becomes deprecated. If I am correct, we use Prisma middleware at the moment, specifically for hashing the user password, possibly some other things. We should look into using the "client extensions" for this now.
- Arguments can now be passed to prisma db seed:
prisma db seed -- --foo bar
. Might be interesting to see if we want to utilize that somehow in our db seeding feature.
When we start doing this: make sure to update the auth/lucia.ts
file and remove the as any
type coercing we did in order for Lucia to work with Prisma 4 models.
https://github.com/wasp-lang/wasp/pull/1625#discussion_r1448948529
Related to #1570
When we update the Prisma version, we should also clean up our Typescript machinery and make sure it works as expected with the new version.
We added CHECKPOINT_DISABLE=1 to Wasp CLI by default, we will likely want to revert that once we upgrade Prisma: https://github.com/wasp-lang/wasp/pull/2089 .
Relevant to check after the migration: https://github.com/wasp-lang/wasp/issues/2099