Skip to content

[Docs] Prisma 7 Migration guide does not mention SSL defaults changed when moving from rust engine to node-pg #7410

@arthurfiorette

Description

@arthurfiorette

This issue is kinda a duplicate of prisma/prisma#28795 but this one just asks to state this information in the documentation and possibly link users to that issue in case of extra problems.

https://www.answeroverflow.com/m/1415722647827775518

Based on the above thread, it seems that previously, invalid SSL certificates were being ignored by Prisma. Since v7 uses node-pg instead of rust engine, the default have changed and migrating to prisma 7 will start throwing User was denied access on the database 'xxx' errors.

The fix is either keep the previous behavior and set:

new PrismaPg({
  connectionString: process.env.DATABASE_URL,
  ssl: { rejectUnauthorized: false },
})

Or to properly set database certificates using either node --use-openssl-ca or by adding NODE_EXTRA_CA_CERTS environment file.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions