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
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:
@@ -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);
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user