notiz-dev / nestjs-prisma-docker

Dockerizing a NestJS app with Prisma and PostgreSQL
https://notiz.dev/blog/dockerizing-nestjs-with-prisma-and-postgresql
93 stars 28 forks source link

ERROR: relation "food.Food" does not exist at character 54 #21

Closed Helios69 closed 1 year ago

Helios69 commented 1 year ago

I've cloned the repo, but getting this error:

postgresprisma  | 2023-02-02 21:21:31.356 UTC [34] ERROR:  relation "food.Food" does not exist at character 54
postgresprisma  | 2023-02-02 21:21:31.356 UTC [34] STATEMENT:  SELECT "food"."Food"."id", "food"."Food"."name" FROM "food"."Food" WHERE 1=1 OFFSET $1
nest-api        | [Nest] 19  - 02/02/2023, 9:21:31 PM   ERROR [ExceptionsHandler] 
nest-api        | Invalid `this.prismaService.food.findMany()` invocation in
nest-api        | /dist/app.controller.js:25:40
nest-api        | 
nest-api        |   22     return this.appService.getHello();
nest-api        |   23 }
nest-api        |   24 getFoods() {
nest-api        | → 25     return this.prismaService.food.findMany()
nest-api        |   The table `food.Food` does not exist in the current database.
nest-api        | Error: 
nest-api        | Invalid `this.prismaService.food.findMany()` invocation in
nest-api        | /dist/app.controller.js:25:40
nest-api        | 
nest-api        |   22     return this.appService.getHello();
nest-api        |   23 }
nest-api        |   24 getFoods() {
nest-api        | → 25     return this.prismaService.food.findMany()
nest-api        |   The table `food.Food` does not exist in the current database.
nest-api        |     at cb (/node_modules/@prisma/client/runtime/index.js:38504:17)
nest-api        |     at async /node_modules/@nestjs/core/router/router-execution-context.js:46:28
nest-api        |     at async /node_modules/@nestjs/core/router/router-proxy.js:9:17