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 3bd8be86cf..7f314b1753 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 @@ -118,6 +118,7 @@ The older `prisma-client-js` provider will be removed in future releases of Pris the new `prisma-client` provider which uses the new Rust-free client. This will give you faster queries, smaller bundle size, and require less system resources when deployed to your server. +Additionally, the `output` field is now **required** in the generator block. Prisma Client will no longer be generated in `node_modules` by default. You must specify a custom output path. #### Before ```prisma @@ -131,9 +132,26 @@ generator client { ```prisma generator client { provider = "prisma-client" + output = "./generated/prisma" } ``` +After running `npx prisma generate`, you'll need to update your imports to use the new generated path: + +```ts +// Before +import { PrismaClient } from '@prisma/client' + +// After +import { PrismaClient } from './generated/prisma/client' +``` + +:::note + +The import path depends on where you place your generated client. Adjust the path based on your `output` configuration and the location of the file you're importing from. + +::: + Additionally other fields such as `url`, `directUrl`, and `shadowDatabaseUrl` in the `datasource` block are deprecated. You can configure them in the [Prisma Config](/orm/reference/prisma-config-reference). If you were previously using `directUrl` to run migrations then you need to pass the `directUrl` value in the `url` field of `prisma.config.ts` instead as the connection string defined in `url` is used by Prisma CLI for migrations.