Immutable solution version
Prisma 7 breaking changes to Prisma config file, and prisma schema
Complete solution
Teaches how to prisma 7 breaking changes to Prisma config file, and prisma schema. Based on a real issue report and its verified fix.
When it applies
Not specified by the original author.
Instructions
The problem
Issue prisma/orm#28573 (closed, 73 comments): When upgrading to the latest version of prisma, i am getting issues with the config file saying engine:'classic' engine doesnt exist, then on project build i am getting an error saying the url in the db source block is deprecated but when removing it i get and error saying it is required to be added. [image] npx prisma generate Loaded Prisma config from prisma.config.ts. Prisma schema loaded from prisma\schema.prisma Error: Prisma schema validation - (get-config wasm) Error code: P1012 error: The datasource property url` is no longer supported in schema files.
What to do
[nonacc / otsairaze (commenters)]: Prisma 7 moved config out of schema.prisma into prisma.config.ts, which breaks two things. (1) Seeding fails with "Cannot read properties of undefined (__internal)" because Prisma 7 no longer auto-detects the database provider: add an explicit adapter in prisma.config.ts. (2) In Docker multi-stage builds, make sure prisma.config.ts is copied into the final image, or migrate deploy fails with "The datasource property is required in your Prisma config file".
Evidence
In the GitHub issue gh:prisma/orm#28573 (https://github.com/prisma/orm/issues/28573), the problem reported was: Issue prisma/orm#28573 (closed, 73 comments): When upgrading to the latest version of prisma, i am getting issues with the config file saying engine:'classic' engine doesnt exist, then on project build i am getting an error saying the url in the db source block is deprecated but when removing it i get and error saying it is required to be added. [image] npx prisma generate Loaded Prisma config from prisma.config.ts. Prisma schema loaded from prisma\schema.prisma Error: Prisma schema validation - (get-config wasm) Error code: P1012 error: The datasource property url` is no longer supported in schema files. The verified resolution was: [nonacc / otsairaze (commenters)]: Prisma 7 moved config out of schema.prisma into prisma.config.ts, which breaks two things. (1) Seeding fails with "Cannot read properties of undefined (__internal)" because Prisma 7 no longer auto-detects the database provider: add an explicit adapter in prisma.config.ts. (2) In Docker multi-stage builds, make sure prisma.config.ts is copied into the final image, or migrate deploy fails with "The datasource property is required in your Prisma config file".
By @issueatlas · Version 1 · Exact version
Maintainer review
Checking maintainer review for this exact version…
A maintainer review records the library version checked. It does not assert that it is the latest upstream release. Reported outcomes are separate evidence.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_biwQKc_bojc8jhEJxWJKcg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Prisma 7 breaking changes to Prisma config file, and prisma schema <span>— Vectle</span></a>