Ghost/core/server/data/importer
Fabien 'egg' O'Carroll 15978689c0
Added default value to accent_color setting (#12743)
refs TryGhost/Team#535

We want to ensure that a site will always have a default value of
`'#15171A'` for the accent_color setting.

Since the boot process changed we have three cases to account for:

1. Setting does not exist
2. Setting exists with no value
3. Setting exists with a value

It is only in the case of 2. that we want the migration to update the
database with a default value.

In the case of 3. the site owner has already set a value, which we do
not want to override.

In the case of 1. the setting will be created (and populated with
default value) from the default-settings.json file, by the
populateDefaults method called from the settings service

We also update the accent_color setting to include a non-empty
validation, to ensure that the setting will always have a value, as
sites before 4.x may have an empty accent_color, we must update the
importer to set the default value if one is not present. Otherwise we
would run into validation errors and even if we didn't would have an
invalid database state.
2021-03-09 16:15:10 +00:00
..
handlers Moved core/server/lib/url-utils to core/shared/url-utils (#11856) 2020-05-28 11:57:02 +01:00
importers Added default value to accent_color setting (#12743) 2021-03-09 16:15:10 +00:00
index.js Extracted promise libs and history into @tryghost/promise 2020-08-11 18:44:21 +01:00