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:
parent
0d82b3f92e
commit
adb5adea57
1 changed files with 2 additions and 4 deletions
|
@ -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
|
|
||||||
}
|
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue