Ghost/core/server/data/migrations/versions/4.0
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
..
01-update-mobiledoc.js Renamed migration to fill 01 2021-02-16 18:19:09 +00:00
02-add-status-column-to-members.js Added status property to members (#12570) 2021-02-02 16:11:34 +00:00
03-populate-status-column-for-members.js Updated status population to handle comped status (#12651) 2021-02-16 10:37:06 +00:00
04-drop-apps-related-tables.js 🏗 Dropped apps related tables 2021-02-03 12:20:08 +13:00
05-add-members-subscribe-events-table.js Added members_subscribe_events table 2021-02-05 16:02:08 +00:00
06-populate-members-subscribe-events-table.js Unified migration logging styles 2021-02-18 17:35:32 +00:00
07-alter-unique-constraint-for-posts-slug.js 🏗 Altered slug unique constraint in posts table 2021-02-09 13:31:12 +13:00
08-add-members-login-events-table.js Unified migration logging styles 2021-02-18 17:35:32 +00:00
09-add-members-email-change-events-table.js Updated members_email_change_events to store previous email (#12641) 2021-02-12 16:15:31 +00:00
10-add-members-status-events-table.js Updated members_status_events table (#12647) 2021-02-16 10:38:36 +00:00
11-add-members-paid-subscription-events-table.js Updated members_paid_subscription_events table (#12636) 2021-02-11 12:45:18 +00:00
12-delete-apps-related-settings-keys.js Renamed duplicate migration 2021-02-11 11:02:18 +00:00
13-add-members-payment-events-table.js Added members event tables (#12618) 2021-02-11 10:54:30 +00:00
14-remove-orphaned-stripe-records.js Remove orphaned Stripe data from SQLite (#12704) 2021-03-01 14:32:49 +00:00
15-add-frontmatter-column-to-meta.js Added the frontmatter column to meta 2021-02-12 15:31:04 +01:00
16-refactor-slack-setting.js Fixed migrations to 4.x from 1.x 2021-03-01 15:41:02 +00:00
17-populate-members-status-events-table.js Unified migration logging styles 2021-02-18 17:35:32 +00:00
18-transform-urls-absolute-to-transform-ready.js 🏗 Changed internal URL storage format to use __GHOST_URL__ (#12731) 2021-03-05 13:54:01 +00:00
19-remove-labs-members-setting.js 🏗 Removed labs from setting 2021-02-17 19:55:16 +13:00
20-refactor-unsplash-setting.js Updated unsplash setting migration to be idempotent 2021-02-18 10:55:59 +13:00
21-sanitize-email-batches-provider-id.js Added migration to remove surrounding <> in email_batches.provider_id (#12673) 2021-02-23 08:48:21 +00:00
22-solve-orphaned-webhooks.js Update the migration number for orphaned webhooks 2021-02-23 10:46:33 +01:00
23-regenerate-posts-html.js Added posts html regeneration migration (#12660) 2021-02-23 17:32:07 +00:00
24-add-missing-email-permissions.js 🐛 Fixed email permissions for all roles 2021-03-01 13:17:43 +00:00
25-populate-members-paid-subscription-events-table.js Remove orphaned Stripe data from SQLite (#12704) 2021-03-01 14:32:49 +00:00
26-add-cascade-on-delete.js 🐛 Fixed a foreign key to point to the right column 2021-03-09 15:19:06 +01:00
27-add-primary-key-brute-migrations-lock.js Updated a duplicate migration id 2021-03-03 10:45:21 +01:00
28-add-webhook-intergrations-foreign-key.js Added a foreign key from webhooks to integrations 2021-03-04 10:56:58 +01:00
29-fix-foreign-key-for-members-stripe-customers-subscriptions.js 🐛 Fixed a foreign key to point to the right column 2021-03-09 15:19:06 +01:00
30-set-default-accent-color.js Added default value to accent_color setting (#12743) 2021-03-09 16:15:10 +00:00