0:00 All right, so next up, I've gone ahead and deleted the starting app files 0:04 that we're not gonna use in this project just to clean things up a bit. 0:08 I'll also go back in the app module and remove these references to them 0:12 that we 0:12 no longer use. 0:14 So now we just have the basic starting application, 0:17 and the first thing I wanna do is set up our database schema. 0:21 So I'm gonna create a new database directory, 0:25 and then I'm gonna create a new schema.ts file where I'm 0:29 gonna create our Drizzle ORM database schemas. 0:32 This is gonna define the shape of the data that we're gonna store inside of our 0:36 Postgres database, so all of the tables in our 0:40 lecture as well as the columns with inside of those tables. 0:44 And so let's go ahead and create each one. I'll break them down. 0:48 Now, this lecture is not a deep dive into 0:50 Drizzle itself. 0:51 I have a previous video on that, and if you'd like to learn more about the 0:55 schemas, how we create them in Drizzle in general, 0:58 I'll leave a link 0:59 below, so you can check that out. All right, 1:01 so the first table I've defined here 1:03 is the orders table. Now, in this application, we're gonna be 1:07 modeling an online store where we have orders. 1:10 We're gonna charge payments to users on those orders, and this is 1:14 gonna be the workflow that we're gonna be modeling where we have 1:18 orders that are placed. We need to charge the user, update the 1:22 stock for the order, and finally, 1:25 send an email to the user. And so this is a complex workflow that 1:29 we need to model, and of course, we need to actually save the underlying 1:33 data for this workflow in the database, and that's where we
The rest of the transcript is for members.
Sign in