Prisma · sdk · fg-0289

Prisma 7 with @prisma/adapter-pg fails with P1010 or a certificate error on a database that worked with Prisma 6

If you see P1010: User was denied access on the database, the cause and the fix for Prisma are below, last verified 2026-10-15.

Verified Oct 2026trust 50/100
Symptom
P1010: User was denied access on the databaseError: self-signed certificate in certificate chain
Cause
Prisma 7 connects through node-postgres instead of the Rust engine, and node-postgres verifies server certificates by default. sslmode=require in the URL also means full verification there and overrides any ssl object passed alongside it.
Fix
Remove sslmode from the URL and give the adapter the provider's CA certificate. Turning verification off with rejectUnauthorized false works but skips the identity check.
Apply
const adapter = new PrismaPg({ connectionString: process.env.DATABASE_URL, // without sslmode ssl: { ca: process.env.DATABASE_CA_CERT }, })
Affected
Prisma ORM 7.0 and later with @prisma/adapter-pg
Sources

Last verified 2026-10-15 · Confirmed by 0 builders

Related traps

Have your agent know this before it fails

$ /plugin marketplace add getfootgun/footgun
$ /plugin install footgun@footgun