mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 14:03:48 +03:00
🏗 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:
parent
7e7a94def3
commit
d254a697b9
@ -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',
|
||||
|
@ -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
|
||||
}
|
||||
};
|
Loading…
Reference in New Issue
Block a user