diff --git a/content/200-orm/800-more/300-upgrade-guides/200-upgrading-versions/400-upgrading-to-prisma-7.mdx b/content/200-orm/800-more/300-upgrade-guides/200-upgrading-versions/400-upgrading-to-prisma-7.mdx index 6c20750f4c..9af341a6e8 100644 --- a/content/200-orm/800-more/300-upgrade-guides/200-upgrading-versions/400-upgrading-to-prisma-7.mdx +++ b/content/200-orm/800-more/300-upgrade-guides/200-upgrading-versions/400-upgrading-to-prisma-7.mdx @@ -248,6 +248,27 @@ export const prisma = new PrismaClient({ ``` If you later switch away from Accelerate to direct TCP, provide the direct URL to the appropriate driver adapter (for example `PrismaPg`) instead of `accelerateUrl`. +### SSL certificate validation changes + +Since Prisma ORM v7 uses `node-pg` instead of the Rust-based query engine, SSL certificate defaults have changed. Previously, invalid SSL certificates were ignored. In v7, you may encounter the following error: + +```bash +Error: P1010: User was denied access on the database +``` + +To fix this, either keep the previous behavior: + +```ts +const adapter = new PrismaPg({ + connectionString: process.env.DATABASE_URL, + ssl: { rejectUnauthorized: false }, +}); +``` + +Or properly configure your database certificates using `node --use-openssl-ca` or by setting the `NODE_EXTRA_CA_CERTS` environment variable. + +For more details, see [GitHub issue #28795](https://github.com/prisma/prisma/issues/28795). + ### Explicit loading of environment variables In Prisma ORM 7.0.0, environment variables are not loaded by default. Instead developers need to explicitly load the variables when calling the `prisma` CLI. Libraries like [`dotenv`](https://github.com/motdotla/dotenv) can be used to manage loading environment variables by reading the appropriate `.env` file.