🏗 Cleanedup app-related settings

refs https://github.com/TryGhost/Ghost/issues/12565
refs f74d459dad

- These fields should have been cleaned up as a result of changed done in referenced commit
This commit is contained in:
Naz 2021-02-02 15:27:52 +13:00 committed by naz
parent 7e7a94def3
commit d254a697b9
2 changed files with 20 additions and 1 deletions

View File

@ -8,7 +8,8 @@ const keyGroupMapper = require('../../../../api/shared/serializers/input/utils/s
const keyTypeMapper = require('../../../../api/shared/serializers/input/utils/settings-key-type-mapper');
const labsDefaults = JSON.parse(defaultSettings.labs.labs.defaultValue);
const ignoredSettings = ['active_apps', 'installed_apps', 'members_from_address', 'members_support_address'];
const ignoredSettings = ['members_from_address', 'members_support_address'];
// NOTE: drop support in Ghost 5.0
const deprecatedSupportedSettingsMap = {
default_locale: 'lang',
active_timezone: 'timezone',

View File

@ -0,0 +1,18 @@
const logging = require('../../../../../shared/logging');
module.exports = {
config: {
transaction: true
},
async up({transacting: knex}){
const settingsKeys = ['installed_apps', 'active_apps'];
logging.info(`Removing ${settingsKeys.join(',')} from "settings" table.`);
await knex('settings')
.whereIn('key', settingsKeys)
.del();
},
async down() {
// noop: no need to recreate any apps as it's a cleanup in major version migration
}
};