Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added migration for new settings keys #21336

Merged
merged 1 commit into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ const EDITABLE_SETTINGS = [
'pintura_css_url',
'donations_currency',
'donations_suggested_amount',
'recommendations_enabled'
'recommendations_enabled',
'body_font',
'heading_font'
];

module.exports = {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
const {addSetting} = require('../../utils');

module.exports = addSetting({
key: 'body_font',
value: '',
type: 'string',
group: 'site'
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
const {addSetting} = require('../../utils');

module.exports = addSetting({
key: 'heading_font',
value: '',
type: 'string',
group: 'site'
});
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,14 @@
"flags": "PUBLIC",
"type": "string"
},
"heading_font": {
"defaultValue": "",
"type": "string"
},
"body_font": {
"defaultValue": "",
"type": "string"
},
"logo": {
"defaultValue": "",
"type": "string"
Expand Down
2 changes: 1 addition & 1 deletion ghost/core/test/unit/server/data/exporter/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = 86;
const allowedKeysLength = 88;
totalKeysLength.should.eql(SETTING_KEYS_BLOCKLIST.length + allowedKeysLength);
});
});
Expand Down
2 changes: 1 addition & 1 deletion ghost/core/test/unit/server/data/schema/integrity.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ describe('DB version integrity', function () {
// Only these variables should need updating
const currentSchemaHash = 'a4f016480ff73c6f52ee4c86482b45a7';
const currentFixturesHash = '475f488105c390bb0018db90dce845f1';
const currentSettingsHash = '051ef2a50e2edb8723e89461448313cb';
const currentSettingsHash = '47a75e8898fab270174a0c905cb3e914';
const currentRoutesHash = '3d180d52c663d173a6be791ef411ed01';

// If this test is failing, then it is likely a change has been made that requires a DB version bump,
Expand Down
Loading