P
Prisma7d ago
Arnór

prisma extension not aware that i'm still on version 6.15

my vscode extension has updated, and i'm getting an error in vscode, eg:
The datasource property `url` is no longer supported in schema files. Move connection URLs for Migrate to `prisma.config.ts` and pass either `adapter` for a direct database connection or `accelerateUrl` for Accelerate to the `PrismaClient` constructor. See https://pris.ly/d/config-datasource and https://pris.ly/d/prisma7-client-configPrisma
The datasource property `url` is no longer supported in schema files. Move connection URLs for Migrate to `prisma.config.ts` and pass either `adapter` for a direct database connection or `accelerateUrl` for Accelerate to the `PrismaClient` constructor. See https://pris.ly/d/config-datasource and https://pris.ly/d/prisma7-client-configPrisma
i attempted to upgrade to 7, but i'll probably hold off on that for a few months - but it's annoying that the vscode extension is unaware of the prisma version i'm using, and giving me an in-editor error on something that was fine before the p7 release. is there a setting to manually specify the version?
2 Replies
Prisma AI Help
You opted for speed from this bot. Let's conjure up an answer right now! The error comes from the updated Prisma VS Code extension, which now defaults to the Prisma 7 language server and validates your schema as Prisma 7, even if your project still uses Prisma 6. [Prisma 7 breaking]
There are two ways to fix this: 1. Pin the VS Code extension to Prisma 6 (recommended if you stay on v6) The extension supports both Prisma 6 and 7 via “Pin/Unpin to Prisma 6”. [Prisma 7 breaking]
Use the command in VS Code: 1. Open Command Palette (Cmd/Ctrl+Shift+P). 2. Look for the Prisma commands like “Pin to Prisma 6”. 3. Pin the extension to Prisma 6 so it validates your schema with v6 rules. This removes the url is no longer supported error while you keep using 6.15. [Prisma 7 breaking] If that doesn’t work or you prefer older behavior, you can also downgrade the extension to a 6.x version (e.g. 6.18) via “Install specific version”. [Prisma 7 breaking] 2. Stay on v7-compatible tooling If/when you upgrade your project to Prisma 7, keep the extension on v7 and move the url into prisma.config.ts as required; but since you’re intentionally staying on 6.15, option 1 above is the right approach. [url no longer] ✅ Great, thanks for letting us know that this solved your question!
Aman
Aman7d ago
You can pin to prisma 6
No description

Did you find this page helpful?