Brian Kimurgor
Get in touch
All posts
26 May 2026prismapostgresqldebuggingnextjs

How Prisma 7 broke my setup (and how I fixed it)

Upgrading to Prisma 7 introduced a new engine model that requires driver adapters. Here's exactly what failed, why, and the fix.

How Prisma 7 broke my setup (and how I fixed it)

When I started building this portfolio, I scaffolded the Prisma schema and ran prisma generate without thinking twice. It had always just worked.

Then I got this:

PrismaClientInitializationError: Using engine type "client" requires either "adapter" or "accelerateUrl"

What changed in Prisma 7

Prisma 7 introduced a new default engine type called "client". Unlike the old "library" engine (which bundled a native binary that talked directly to your database), the new engine is designed to work through Prisma Accelerate — their hosted connection pooling and caching layer.

If you're not using Accelerate and you're connecting directly to PostgreSQL, the new default breaks.

The fix: driver adapters

Prisma 7 introduced driver adapters as the proper solution for direct database connections. Instead of the old native binary, you provide a Node.js database driver and Prisma wraps it.

Step 1: Install the adapter

npm install @prisma/adapter-pg pg
npm install --save-dev @types/pg

Step 2: Enable it in schema.prisma

generator client {
  provider        = "prisma-client-js"
  previewFeatures = ["driverAdapters"]
}

Step 3: Update PrismaClient instantiation

import { PrismaClient } from "@prisma/client";
import { PrismaPg } from "@prisma/adapter-pg";

const adapter = new PrismaPg({ connectionString: process.env.DATABASE_URL! });
export const prisma = new PrismaClient({ adapter });

That's it. Everything else stays the same.

The real lesson

Read the migration guide before upgrading major versions. I didn't. Twenty minutes of confusion could have been five minutes of reading.