

Lesson 01 · 10 min
Schema and models
One schema.prisma file describes the tables, and Prisma generates a typed client.
10 minLesson 1 of 9Practice includedAsk AI on any point
In schema.prisma you describe models, which are tables. Every field has a type and attributes: @id, @unique, @default. prisma generate creates a client where prisma.user.findMany() knows every field and suggests them in the editor.
String?means the field may be NULL.@default(cuid())or@default(autoincrement())generates the id.DATABASE_URLin.envtells Prisma which database to connect to.
Check
Lock it in before you move on
1. What does
name String?mean?2. What does
prisma generatedo?3. Can you add a column by hand in the production database?