Upgrade to Prisma v7 with PrismaPg adapter and Next.js 15 compatibility #3909
ccantynzcommented Apr 12, 2026
Originally written by @vercel[bot] on GitHub.
The latest updates on your projects. Learn more about Vercel for GitHub.
| Project | Deployment | Actions | Updated (UTC) |
|---|---|---|---|
| marco-reid-com | Preview, Comment | Apr 12, 2026 6:45pm |
Cross-repo impact
See what breaks downstream if this PR merges.
⮌ Merged
This pull request was merged into main.
c comment · e edit title · m merge · a approve · r request changes · ? shortcuts
Originally written by @ccantynz-alt on GitHub.
Imported from https://github.com/ccantynz-alt/MarcoReid.com/pull/34
Summary
This PR upgrades the project to Prisma v7 with the new PrismaPg adapter for better PostgreSQL support, implements lazy-loading patterns for database and Stripe clients, and updates route handlers to be compatible with Next.js 15's async params.
Key Changes
@prisma/clientfrom v5.22.0 to v7.7.0 and added@prisma/adapter-pgdependency for native PostgreSQL supportparamsasPromise<{ id: string }>and await the params before use across:app/api/clients/[id]/route.tsapp/api/matters/[id]/route.tsapp/api/documents/[id]/route.tsapp/api/trust-accounts/[id]/transactions/route.tsapp/api/marketplace/payments/[id]/{capture,refund}/route.ts2024-11-20.acaciato2025-02-24.acaciaprisma.config.tsfor Prisma v7 configuration with database URL setupheaders()call in Stripe webhook handler to use async/await pattern for Next.js 15cardsvariable (partial refactor)prisma.config.tsfrom TypeScript compilationImplementation Details
idproperty!) for the secret key, assuming it's always provided in productionhttps://claude.ai/code/session_013PkMDsnQTZs98rFcV3hYUg