Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand Down
Loading