Prisma ORM patterns — schema design, migrations, type-safe queries, testing, error handling, and performance
96
95%
Does it follow best practices?
Impact
100%
1.28xAverage score across 3 eval scenarios
Passed
No known issues
Prisma schema design rules
Generator block present
100%
100%
DATABASE_URL from env()
100%
100%
Money as Int
0%
100%
Status enum with uppercase values
100%
100%
createdAt on all models
62%
100%
updatedAt on all models
70%
100%
Foreign key indexes
100%
100%
Filtered column indexes
100%
100%
Cascade delete on child relation
0%
100%
Correct relation fields
100%
100%
PostgreSQL provider
100%
100%
Query patterns, transactions, error handling, bulk ops
select for list view
0%
100%
include for detail view
100%
100%
No N+1 in detail
100%
100%
Transaction for order creation
100%
100%
Uses tx inside transaction
100%
100%
P2025 error handling
100%
100%
Bulk updateMany for cancellation
100%
100%
Singleton client pattern
0%
100%
Conditional logging
0%
100%
No select+include mix
100%
100%
Import from @prisma/client
100%
100%
Prisma test database setup and isolation
DATABASE_URL from environment
100%
100%
.env.test file present
100%
100%
deleteMany in beforeEach
100%
100%
Child-to-parent delete order
100%
100%
Seed data in beforeEach
0%
100%
afterAll disconnect
100%
100%
Test independence
100%
100%
Not-found test
100%
100%
Create order test
100%
100%
No hardcoded DB URL in test
100%
100%