Facing the same problems as
https://payloadcms.com/community-help/discord/usual-process-to-change-payload-config-database-schema-in-production
https://payloadcms.com/community-help/discord/initial-migration-not-happening-with-postgres
I ran migrate before pushing.
Here's my package.json
"scripts": {
"build": "next build",
"ci": "payload migrate && pnpm build",
"dev": "next dev",
"generate:types": "payload generate:types",
"lint": "next lint",
"payload": "cross-env NODE_OPTIONS=--no-deprecation payload",
"start": "next start"
},
pnpm build works fine locally
Vercel Logs:
+ @types/escape-html 1.0.4
+ @types/node 22.12.0
+ @types/react 19.0.7
+ @types/react-dom 19.0.3
+ autoprefixer 10.4.20
+ eslint 9.19.0
+ eslint-config-next 15.1.5
+ postcss 8.5.1
+ prettier 3.4.2
+ tailwindcss 3.4.17
+ typescript 5.7.3
Done in 22.4s
Detected Next.js version: 15.1.5
Running "pnpm run ci"
> payload-vercel-postgres-template@1.0.0 ci /vercel/path0
> payload migrate && pnpm build
[18:43:07] WARN: No email adapter provided. Email will be written to console. More info at https://payloadcms.com/docs/email/overview.
[18:43:07] INFO: Reading migration files from /vercel/path0/src/migrations
? It looks like you've run Payload in dev mode, meaning you've dynamically pushed changes to your database.
It gets stuck after this and eventually the build fails. I have also set NODE_ENV=PRODUCTION in Vercel.
Probably gets stuck because of the prompt.
? It looks like you've run Payload in dev mode, meaning you've dynamically pushed changes to your database.
If you'd like to run migrations, data loss will occur. Would you like to proceed? › (y/N)
How do I disable the dev mode since NODE_ENV=PRODUCTION didn't work.
I also dont have the dev table in migrations.