week 10.2 prisma
//using ORM : Simpler syntax (converts objects to SQL queries under the hood) //code CREATE TABLE users ( id SERIAL PRIMARY KEY, name VARCHAR(100), email VARCHAR(100) UNIQUE NOT NULL ); ALTER TABLE users ADD COLUMN phone_number VARCHAR(15); //As your app grows, you will have a lot of these CREATE and ALTER commands. ORMs (or more specifically Prisma) maintains all of these for you. For example - https://github.com/code100x/cms/tree/main/prisma/migrations fd //Data mode in prisma 1. Data model In a single file, define your schema. What it looks like, what tables you have, what field each table has, how are rows related to each other. 2. Automated migrations Prisma generates and runs database migrations based on changes to the Prisma schema. 3. Type Safety Prisma generates a type-safe database client based on the Prisma schema. 4. Auto-Completion //installing prisima lets create simple t...