error in production, using Vercel

My app is running fine locally, I also have a local migrations folder and schema but as I have deployed my project on Vercel it's erroring out that,

error: relation "users" does not exist
    at /var/task/node_modules/pg-pool/index.js:45:11
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async tH (/var/task/.next/server/app/dev/page.js:8:33294)
    at async /var/task/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:16:418
    at async rP (/var/task/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:15:7978)
    at async r9 (/var/task/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:18:1139)
    at async es (/var/task/node_modules/next/dist/compiled/next-server/server.runtime.prod.js:16:26324)
    at async en.responseCache.get.routeKind (/var/task/node_modules/next/dist/compiled/next-server/server.runtime.prod.js:17:1026)
    at async r6.renderToResponseWithComponentsImpl (/var/task/node_modules/next/dist/compiled/next-server/server.runtime.prod.js:17:508)
    at async r6.renderPageComponent (/var/task/node_modules/next/dist/compiled/next-server/server.runtime.prod.js:17:5121) {
  length: 104,
  severity: 'ERROR',
  code: '42P01',
  detail: undefined,
  hint: undefined,
  position: '13',
  internalPosition: undefined,
  internalQuery: undefined,
  where: undefined,
  schema: undefined,
  table: undefined,
  column: undefined,
  dataType: undefined,
  constraint: undefined,
  file: 'parse_relation.c',
  line: '1449',
  routine: 'parserOpenTable',
  digest: '3801088933'
}


I am using the Postgres docker image for my local database and I have deployed that image on Vercel and then I have connected my deployed next.js project to the Vercel db instance.

I do think that I will have to add some scripts to my
package.json
file for the migrations in the prod but I am not able to get that

https://github.com/Boby900/docker-demo
Screenshot_639.png
Screenshot_638.png
GitHub
a dashboard built with next.js, x-api, shadcn and docker-postgres. - Boby900/docker-demo
Was this page helpful?