Removed settings populateDefaults pre-migration

refs https://github.com/TryGhost/Ghost/issues/12568
refs 5fbc40430b

- Having populateDefaults run before migrations creates a chicken and egg problem where populate defaults can create records that are "non-migratable" as happened in https://github.com/TryGhost/Ghost/issues/12026
This commit is contained in:
Naz 2021-02-01 19:29:13 +13:00 committed by naz
parent f1cf7b125f
commit 864fcd8a0c

View File

@ -3,8 +3,5 @@ const models = require('../../../../models');
module.exports = function before() { module.exports = function before() {
models.init(); models.init();
return dbBackup.backup().then(() => { return dbBackup.backup();
// ensure that our default settings are created to limit possible db states in migrations
return models.Settings.populateDefaults();
});
}; };