You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/DB_NEON_PRISMA.md
+16Lines changed: 16 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -69,6 +69,22 @@ Recommended:
69
69
- Preview uses preview/staging Neon DB URLs (pooled + direct)
70
70
- Production uses production Neon DB URLs (pooled + direct)
71
71
72
+
### Vercel build command
73
+
74
+
This repo expects Vercel to use:
75
+
76
+
```txt
77
+
npm run vercel-build
78
+
```
79
+
80
+
That script runs, in order:
81
+
82
+
1.`npm run db:generate`
83
+
2.`npm run db:deploy`
84
+
3.`npm run build`
85
+
86
+
This keeps Prisma Client generation explicit and applies additive Prisma migrations through `DIRECT_DATABASE_URL` before `next build` completes.
87
+
72
88
## Common Mistake to Avoid
73
89
74
90
Using the pooled `-pooler` URL for Prisma migrations can cause migration problems or connection behavior issues. Keep migrations on `DIRECT_DATABASE_URL` (direct endpoint) and runtime on `DATABASE_URL` (pooled endpoint).
0 commit comments