๐ฃ๐ฟ๐ถ๐๐บ๐ฎ ๐ณ: ๐๐ถ๐ ๐๐ต๐ฒ ๐๐ฎ๐๐ฎ๐๐ผ๐๐ฟ๐ฐ๐ฒ ๐จ๐ฅ๐ ๐๐ฟ๐ฟ๐ผ๐ฟ
Did you see an error during prisma migrate dev? Prisma no longer supports the url property in schema files.
The database URL now belongs in a new file.
Follow these steps to fix it:
- Remove the url from your schema.prisma file.
- Create a file named prisma.config.ts in your project root.
- Add this code to the file:
import 'dotenv/config' import { defineConfig } from 'prisma/config'
export default defineConfig({ datasource: { url: process.env.DATABASE_URL!, }, })
- Run npx prisma generate.
Your database URL now lives in the config file.
Source: https://dev.to/joodi/prisma-7-the-datasource-property-url-is-no-longer-supported-heres-the-fix-1178