diff --git a/ghost/core/core/server/data/migrations/versions/5.39/2023-03-14-12-26-add-last-mentions-email-report-timestamp-setting.js b/ghost/core/core/server/data/migrations/versions/5.39/2023-03-14-12-26-add-last-mentions-email-report-timestamp-setting.js new file mode 100644 index 0000000000..432ab0024a --- /dev/null +++ b/ghost/core/core/server/data/migrations/versions/5.39/2023-03-14-12-26-add-last-mentions-email-report-timestamp-setting.js @@ -0,0 +1,8 @@ +const {addSetting} = require('../../utils'); + +module.exports = addSetting({ + key: 'last_mentions_report_email_timestamp', + value: null, + type: 'number', + group: 'core' +}); diff --git a/ghost/core/core/server/data/schema/default-settings/default-settings.json b/ghost/core/core/server/data/schema/default-settings/default-settings.json index ec708970ac..33785f7ade 100644 --- a/ghost/core/core/server/data/schema/default-settings/default-settings.json +++ b/ghost/core/core/server/data/schema/default-settings/default-settings.json @@ -1,5 +1,9 @@ { "core": { + "last_mentions_report_email_timestamp": { + "defaultValue": null, + "type": "number" + }, "db_hash": { "defaultValue": null, "type": "string" diff --git a/ghost/core/test/integration/settings/settings.test.js b/ghost/core/test/integration/settings/settings.test.js index 8818d3f144..01d649fc53 100644 --- a/ghost/core/test/integration/settings/settings.test.js +++ b/ghost/core/test/integration/settings/settings.test.js @@ -15,6 +15,7 @@ describe('Settings', function () { // Allowlist: Only this list needs updating when a core setting is added/removed/renamed const coreSettingKeys = [ + 'last_mentions_report_email_timestamp', 'db_hash', 'routes_hash', 'next_update_check', diff --git a/ghost/core/test/regression/models/model_settings.test.js b/ghost/core/test/regression/models/model_settings.test.js index 0105f933b6..4d0ca751d9 100644 --- a/ghost/core/test/regression/models/model_settings.test.js +++ b/ghost/core/test/regression/models/model_settings.test.js @@ -5,7 +5,7 @@ const db = require('../../../core/server/data/db'); // Stuff we are testing const models = require('../../../core/server/models'); -const SETTINGS_LENGTH = 81; +const SETTINGS_LENGTH = 82; describe('Settings Model', function () { before(models.init); diff --git a/ghost/core/test/unit/server/data/exporter/index.test.js b/ghost/core/test/unit/server/data/exporter/index.test.js index f9ffc69678..36d9edcba0 100644 --- a/ghost/core/test/unit/server/data/exporter/index.test.js +++ b/ghost/core/test/unit/server/data/exporter/index.test.js @@ -236,7 +236,7 @@ describe('Exporter', function () { // NOTE: if default settings changed either modify the settings keys blocklist or increase allowedKeysLength // This is a reminder to think about the importer/exporter scenarios ;) - const allowedKeysLength = 73; + const allowedKeysLength = 74; totalKeysLength.should.eql(SETTING_KEYS_BLOCKLIST.length + allowedKeysLength); }); }); diff --git a/ghost/core/test/unit/server/data/schema/integrity.test.js b/ghost/core/test/unit/server/data/schema/integrity.test.js index aa6f92f570..0adbb7ce9c 100644 --- a/ghost/core/test/unit/server/data/schema/integrity.test.js +++ b/ghost/core/test/unit/server/data/schema/integrity.test.js @@ -37,7 +37,7 @@ describe('DB version integrity', function () { // Only these variables should need updating const currentSchemaHash = '08a9d998774843eb5594450280ab0fce'; const currentFixturesHash = 'd99d3c2891e79b8662ed6a312490d2fd'; - const currentSettingsHash = 'b0c8359b7482e39112e7c5739d43f11b'; + const currentSettingsHash = '7b567742b9667d38191d8455c422c5d5'; const currentRoutesHash = '3d180d52c663d173a6be791ef411ed01'; // If this test is failing, then it is likely a change has been made that requires a DB version bump, diff --git a/ghost/core/test/utils/fixtures/default-settings.json b/ghost/core/test/utils/fixtures/default-settings.json index 634030dedc..2087b4f897 100644 --- a/ghost/core/test/utils/fixtures/default-settings.json +++ b/ghost/core/test/utils/fixtures/default-settings.json @@ -1,5 +1,9 @@ { "core": { + "last_mentions_report_email_timestamp": { + "defaultValue": null, + "type": "string" + }, "db_hash": { "defaultValue": null, "type": "string"