Paste your Prisma schema or SQL DDL and get a focused review: missing indexes, normalization issues, N+1 risks, and security concerns โ with exact fixes.
## Schema Review ### ๐ด Critical **Missing index on posts.userId** Every query filtering posts by user does a full table scan. Fix: add `@@index([userId])` to the Post model. ### ๐ก Design Issues **address stored as single string in User** Blocks filtering by city/country. Split into: street, city, state, country, postalCode. ### โ What's Good - cuid() IDs used correctly - Cascade deletes set correctly
Constraints