wasp-lang / wasp

The fastest way to develop full-stack web apps with React & Node.js.
https://wasp-lang.dev
MIT License
12.73k stars 1.13k forks source link

Migrate to latest Prisma #1281

Open Martinsos opened 1 year ago

Martinsos commented 1 year ago

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.
infomiho commented 5 months ago

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 commented 3 weeks ago

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.

Martinsos commented 3 weeks ago

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 .

sodic commented 3 weeks ago

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