Skip to content

Sample 22-graphql-prisma not working due to prisma 7 upgrade #15965

@denniske

Description

@denniske

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

Prisma db push is failing for this sample:

$ npx prisma db push

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. 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-config
  -->  prisma/schema.prisma:6
   | 
 5 |   provider = "sqlite"
 6 |   url      = "file:./dev.db"
   | 

Validation Error Count: 1
[Context: getConfig]

Prisma CLI Version : 7.0.0

Minimum reproduction code

https://github.com/nestjs/nest/tree/master/sample/22-graphql-prisma

Steps to reproduce

$ yarn  
                            
$ yarn generate:typings   

$ npx prisma db push

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. 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-config
  -->  prisma/schema.prisma:6
   | 
 5 |   provider = "sqlite"
 6 |   url      = "file:./dev.db"
   | 

Validation Error Count: 1
[Context: getConfig]

Prisma CLI Version : 7.0.0

Expected behavior

Sample 22 works out of the box.

NestJS version

11.1.9

Packages versions

[Nest CLI]
Nest CLI Version : 11.0.12 

[Nest Platform Information]
platform-express version : 11.1.9
schematics version       : 11.0.9
graphql version          : 13.2.0
testing version          : 11.1.9
apollo version           : 13.2.1
common version           : 11.1.9
core version             : 11.1.9
cli version              : 11.0.12

Node.js version

22.12.0

In which operating systems have you tested?

  • macOS
  • Windows
  • Linux

Other

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs triageThis issue has not been looked into

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions