Prisma · tool · fg-0286

Prisma 7 error P1012: The datasource property `url` is no longer supported in schema files

If you see Error code: P1012, the cause and the fix for Prisma are below, last verified 2026-10-15.

Verified Oct 2026trust 50/100
Symptom
Error code: P1012error: The datasource property `url` is no longer supported in schema files. Move connection URLs for Migrate to `prisma.config.ts`VS Code flags the same error in a project that is still on Prisma 6
Cause
Prisma 7 moved url, directUrl, and shadowDatabaseUrl out of schema.prisma into prisma.config.ts, and the runtime connection now comes from a driver adapter. The VS Code extension defaults to the Prisma 7 language server, so it also flags Prisma 6 schemas.
Fix
Remove url from the datasource block, set datasource.url in prisma.config.ts, and pass an adapter to PrismaClient. Projects staying on Prisma 6 should run the extension's 'Pin the current workspace to Prisma 6' command (extension 7.x), which sets prisma.pinToPrisma6.
Apply
// prisma/schema.prisma datasource db { provider = "postgresql" } // prisma.config.ts import 'dotenv/config' import { defineConfig } from 'prisma/config' export default defineConfig({ schema: 'prisma/schema.prisma', datasource: { url: process.env.DATABASE_URL }, })
Affected
Prisma ORM 7.0 and later (November 2025), reproduced on 7.10.0
Sources

Last verified 2026-10-15 · Confirmed by 0 builders

Related traps

Have your agent know this before it fails

$ /plugin marketplace add getfootgun/footgun
$ /plugin install footgun@footgun