Skip to content

Commit c2db57a

Browse files
authored
(fix) Remove Direct URL from Prisma 7 Migration guide (#7286)
1 parent a4b3e68 commit c2db57a

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

content/200-orm/800-more/300-upgrade-guides/200-upgrading-versions/400-upgrading-to-prisma-7.mdx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,9 @@ generator client {
127127
}
128128
```
129129

130-
Additionally other fields such as `url`, `directUrl`, and `shadowDatabaseUrl` in the `datasource` block are deprecated and now part of the [Prisma Config](/orm/reference/prisma-config-reference)
130+
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).
131+
132+
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.
131133

132134
```ts
133135
import 'dotenv/config'
@@ -136,7 +138,6 @@ import { defineConfig, env } from 'prisma/config'
136138
export default defineConfig({
137139
datasource: {
138140
url: env('DATABASE_URL'),
139-
directUrl: env('DIRECT_URL'),
140141
shadowDatabaseUrl: env('SHADOW_DATABASE_URL')
141142
},
142143
})

0 commit comments

Comments
 (0)