Why I Dropped Prisma for Raw SQL on This Project
53 Reads
Why I Dropped Prisma for Raw SQL on This Project
I started this portfolio with Prisma. By the end, I had deleted it. Here is the honest post-mortem.
What Prisma gave me
- Type-safe queries
- Migrations
- A nice DX for simple CRUD
What it cost me
- A build step in CI
- Extra bundle weight in the edge runtime
- Schema drift when I wanted to tweak one column
The replacement
A 40-line lib/db.ts that wraps mysql2 with query, queryOne, and execute. That is it. Every server action in the app uses it. No generated client, no migrations folder.
Would I do it again?
For a bigger app — no, Prisma still wins. For a personal site with ~5 tables — absolutely.