fix: use prodMigrations for auto-migrate on startup instead of CLI
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 7s
Build & Deploy / 🧪 QA (push) Failing after 2m19s
Build & Deploy / 🏗️ Build (push) Has been skipped
Build & Deploy / 🚀 Deploy (push) Has been skipped
Build & Deploy / 🧪 Smoke Test (push) Has been skipped
Build & Deploy / ⚡ Lighthouse (push) Has been skipped
Build & Deploy / ♿ WCAG (push) Has been skipped
Build & Deploy / 🛡️ Quality Gates (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 4s

This commit is contained in:
2026-02-24 22:44:22 +01:00
parent 923ff2071b
commit 51e0d86a6c
2 changed files with 2 additions and 4 deletions

View File

@@ -7,6 +7,7 @@ import { fileURLToPath } from 'url';
import { nodemailerAdapter } from '@payloadcms/email-nodemailer';
import { BlocksFeature } from '@payloadcms/richtext-lexical';
import { payloadBlocks } from './src/payload/blocks/allBlocks';
import { migrations } from './src/migrations';
// Only disable sharp cache in production to prevent memory leaks.
// In dev, the cache avoids 41s+ re-processing per image through VirtioFS.
@@ -45,6 +46,7 @@ export default buildConfig({
outputFile: path.resolve(dirname, 'payload-types.ts'),
},
db: postgresAdapter({
prodMigrations: migrations,
pool: {
connectionString:
process.env.DATABASE_URI ||