BlogPrisma

Prisma 7: the datasource url is no longer supported How to fix it.

Prisma 7 removed the url field from the datasource block. Pin Prisma to version 6, or move the connection string to prisma.config.ts.

How the Agent API works
What you see (wording varies by version)
Error: The datasource property `url` is no longer supported in schema files.
  • What it meansYour schema uses the old url field
  • Fix onePin prisma and @prisma/client to ^6
  • Fix twoUse prisma.config.ts
  • Why nownpm installs the newest major

What it means

In older Prisma versions, a datasource block in schema.prisma held the connection string in a url field. Prisma 7 removed that field. If you install Prisma today without a version, you get version 7, and a schema written for version 6 fails on its first deploy.

How to fix it

Pin to version 6. In package.json, set both prisma and @prisma/client to ^6, update the lock file and commit. Your existing schema keeps working.

Or move to Prisma 7's way. Put the connection string in prisma.config.ts, and use a driver adapter in your client. Follow Prisma's own upgrade guide for the exact code.

package.json
{
  "dependencies": {
    "@prisma/client": "^6.0.0",
    "prisma": "^6.0.0"
  }
}

01Questions

Prisma 7 questions, answered.

Anything else? Write to us and a person answers.

support@antideploy.com
Which option is quicker?

Pinning to version 6 is a two-line change. Moving to version 7's configuration is a larger change.

Will Antideploy run my migration with Prisma 7?

Antideploy runs npx prisma migrate deploy if you have a migrations folder, and npx prisma db push if you do not. It pins the Prisma command to the version of @prisma/client your project uses.

Does this failed deploy cost anything?

No. Failed deploys never count against your plan.

Deploy something. Start with one sentence.

Paste one sentence into your coding agent, click Approve once, and get a live link. No card, no trial clock.

Start from GitHub or a folder
Prompt copied Paste it into Claude Code, Codex or Cursor and press Enter.