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

URL: https://antideploy.com/blog/prisma-7-datasource-url-no-longer-supported

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

**What you see (wording varies by version)**

```
Error: The datasource property `url` is no longer supported in schema files.
```

## At a glance

- **What it means**: Your schema uses the old url field
- **Fix one**: Pin prisma and @prisma/client to ^6
- **Fix two**: Use prisma.config.ts
- **Why now**: npm installs the newest major

Published 7 October 2026. Facts checked 7 October 2026. 1 min read.

## 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"
  }
}
```

## Prisma 7 questions, answered.

Anything else? Write to us and a person answers.

[support@antideploy.com](mailto: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.

## More guides, and the platform.

Each platform page covers one part of Antideploy: what it does, where it stops and the questions people ask. [See the whole platform](https://antideploy.com/platform), or [all the guides](https://antideploy.com/blog).

- [sh: prisma: not found during prisma generate](https://antideploy.com/blog/prisma-generate-command-not-found): The build ran prisma generate and prisma is not installed. Add it at the same version as @prisma/client.
- [Prisma Environment variable not found](https://antideploy.com/blog/prisma-environment-variable-not-found): Prisma needed a variable and it was not set. DATABASE_URL is set for you when your app has a database.
- [How to add a Postgres database to your app](https://antideploy.com/blog/how-to-add-a-postgres-database-to-your-app): Ask your agent. A Postgres 17 database is created beside your app and DATABASE_URL is set.

- [Deployments](https://antideploy.com/platform/deployments)
- [Database](https://antideploy.com/platform/database)
- [Logs and monitoring](https://antideploy.com/platform/logs-and-monitoring)

Facts on this page were checked against the live platform on 7 October 2026.

## 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.

To set this up, give your coding agent this sentence:

```text
Set this project up to deploy on Antideploy. Fetch https://antideploy.com/agent.md and follow it.
```
