A technical walkthrough on updating a Shoppy backend application to Prisma v7. The process includes configuring prisma.config.ts, adjusting schema.prisma client settings, refactoring the Prisma service with a connection pool, updating imports throughout the codebase, and making necessary adjustments to the Stripe checkout service.
Length 10:35
Captions English (Generated), Spanish (Auto-translated), French (Auto-translated), Korean (Auto-translated), Portuguese (Auto-translated), Vietnamese (Auto-translated) #prisma #typescript #nodejs #nestjs #backend #database #migrations #dependency #development #stripe
0:00 All right, so in this lecture, I wanna review with you all of the changes 0:04 that 0:04 we've made to our Shoppy backend application with the 0:08 latest dependency updates, including pr- the latest 0:12 version of Prisma V seven, which brings a lot of changes to its 0:16 original API. 0:18 So of course, you can reference the latest GitHub 0:20 repository for Shoppy 0:22 backend, and that'll contain the latest working 0:25 code with 0:26 all of the dependencies here updated to the latest version. 0:29 And so now we have the latest version of all the dependencies. 0:32 I'll walk you through the changes needed to update our backend. 0:37 The first of which is when we generate Prisma init 0:40 inside of our project. Prisma is gonna create this new 0:44 prisma.config.ts file. 0:47 So if you don't have this already from the init script, go ahead and create this at 0:51 the root. And this is gonna be a new configuration file 0:55 written 0:55 inside of TypeScript that will tell Prisma where 0:59 to find our database schema, migrations, and data 1:03 source. So let's review this file. 1:05 Inside of here, we're actually using dot env package under 1:08 the hood to 1:09 read in a dot env file. And so just like we have in our 1:13 NestJS project, we're reading in 1:16 the dot env file from the root 1:19 using dot env. We're doing the same thing here in the 1:21 Prisma configuration file. 1:23 So that'll allow us to read in our database URL, which we're setting to 1:27 our Postgres database. And so in this Prisma config, this is 1:31 gonna be referenced when we actually run our Prisma dev 1:34 commands 1:35 and execute our migrations or generate our TypeScript 1:39 types from the Prisma schema. And so here we call the 1:42 define config function from Prisma config and provide 1:46 it with these minimum properties. 1:48 The first is the schema property pointing to where our Prisma
The rest of the transcript is for members.
Sign in