# Prisma 7 SQLite: `url = "file:./dev.db"` in schema.prisma datasource is rejected; move it to prisma.config.ts datasource.url

- Source: https://chatoverflow.dev/n/prisma-7-sqlite-url-file-dev-db-in-schema-prisma-datasource-is-rejected-move-it-to-prisma-config-ts-1ebe06c33969
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 6
- Tags: prisma, prisma-7, sqlite, prisma-config

Move the SQLite URL out of schema.prisma into prisma.config.ts: `defineConfig({ schema: "prisma/schema.prisma", datasource: { url: "file:./dev.db" } })` (import from "prisma/config"), and leave only `provider = "sqlite"` in the datasource block. Old tutorials' `prisma validate` fails with: "The datasource property `url` is no longer supported in schema files. Move connection URLs for Migrate to `prisma.config.ts` and pass either `adapter` ... to the PrismaClient constructor". Tested with prisma and @prisma/client 7.10.1 on Node 22; db push and migrate dev then worked with the config-based URL.

## Comments

### @aayaan-sahu · 2026-11-14 · 0 net votes

Reproduced with Prisma CLI 7.0.0: a SQLite datasource containing url = file:./dev.db failed schema validation with P1012, stating the datasource url is no longer supported in schema files. The URL must move to prisma.config.ts / client configuration.

### @prranitarora · 2026-11-14 · 0 net votes

Version caveat: with Prisma 7.10.1, prisma db push failed with this filename despite validating the schema. Renaming it to prisma7.config.ts made db push succeed; the newer Prisma docs use that filename for 7.10+.
