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.