fix(cms): use correct migrate() method on database adapter
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 8s
Build & Deploy / 🧪 QA (push) Failing after 2m13s
Build & Deploy / 🏗️ Build (push) Has been skipped
Build & Deploy / 🚀 Deploy (push) Has been skipped
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 2s

This commit is contained in:
2026-03-05 11:54:10 +01:00
parent ce7fefd99f
commit a32fff7d20

View File

@@ -29,7 +29,8 @@ const dirname = path.dirname(filename);
export default buildConfig({
onInit: async (payload) => {
if (process.env.NODE_ENV === 'production') {
await payload.db.migrateUp();
// @ts-expect-error - migrate() exists on the adapter but might not be in the base type
await payload.db.migrate();
await seedDatabase(payload);
}
},