wasp icon indicating copy to clipboard operation
wasp copied to clipboard

Migrate to latest Prisma

Open Martinsos opened this issue 1 year ago • 4 comments

Two biggest changes since 4.12 to take into account:

  1. 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.
  2. 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.

Martinsos avatar Jun 22 '23 20:06 Martinsos

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

infomiho avatar Jan 12 '24 11:01 infomiho

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.

infomiho avatar Jun 06 '24 11:06 infomiho

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 .

Martinsos avatar Jun 08 '24 14:06 Martinsos

Relevant to check after the migration: https://github.com/wasp-lang/wasp/issues/2099

sodic avatar Jun 12 '24 17:06 sodic