0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-11 02:12:21 -05:00

Fixed incorrect brand structure in settings migration

no issue

- Previous migration in commit - 2614565d5a - was using incorrect json structure for brand -> primary_color
- Fixes the up/down migrations to work on correct existing `brand: primary_color` structure
This commit is contained in:
Rish 2020-06-23 22:13:32 +05:30
parent 0d82b3f92e
commit adb5adea57

View file

@ -37,7 +37,7 @@ module.exports = {
.select('value'); .select('value');
const value = JSON.parse(brandResult[0].value); const value = JSON.parse(brandResult[0].value);
const accentColor = value.brand.primaryColor || ''; const accentColor = value.primaryColor || '';
logging.info(`Updating brand.primaryColor in settings to accent_color with value '${accentColor}'`); logging.info(`Updating brand.primaryColor in settings to accent_color with value '${accentColor}'`);
@ -74,9 +74,7 @@ module.exports = {
.where('key', 'accent_color') .where('key', 'accent_color')
.update('key', 'brand') .update('key', 'brand')
.update('value', JSON.stringify({ .update('value', JSON.stringify({
brand: { primaryColor
primaryColor
}
})); }));
} }
}; };