Exercise 3: Fixing a Broken Model — Possible Solution ======================================================= Original (written on one line in the exercise): model users { ID int @id Email String @unique @unique tags String[] price Float } Mistakes and fixes: 1. Model name "users" -> use singular PascalCase, "User". If the table must be called "users", add @@map("users"). 2. Type "int" -> types are case-sensitive: "Int". 3. Field names "ID", "Email" -> camelCase: "id", "email" (not an error, but against convention, and it shapes the client's API). 4. "@unique @unique" -> an attribute can only appear once. 5. "tags String[]" -> scalar lists aren't supported on SQLite. Use a separate Tag model with a relation (Chapter 8), or, if the tags don't need to be queried individually, a Json field. 6. "price Float" -> use Decimal for money. 7. The id has no default, so every create would need you to supply an id yourself. Usually add @default(autoincrement()). Fixed: model User { id Int @id @default(autoincrement()) email String @unique price Decimal @@map("users") } (plus a separate Tag model, covered in Chapter 8) WHY THIS WORKS AS AN ANSWER ------------------------------ It separates real errors (the lowercase type, the duplicate attribute, the list on SQLite) from convention and design problems, and gives a reason for each fix. `npx prisma validate` would catch the first group automatically.