Performance: Prisma migrations
MEDIUM IMPACT
Prisma migrations affect backend database schema updates and can indirectly impact frontend load times if migrations block API responses.
Run migrations as a separate deployment step before starting the app, or use Prisma migrate deploy CLI asynchronously.
await prisma.$executeRaw`ALTER TABLE users ADD COLUMN age INT;` // run migration synchronously on app start
| Pattern | Backend Blocking | API Startup Delay | User Impact | Verdict |
|---|---|---|---|---|
| Synchronous migration during app start | Yes | High (seconds) | Slower API response, delayed page load | [X] Bad |
| Separate migration step before app start | No | None | Fast API startup, better user experience | [OK] Good |