mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-17 23:44:39 -05:00
Added "email_track_opens" setting (#12404)
refs https://github.com/TryGhost/Ghost/issues/12390 - adds "email_track_opens" setting to the `email` group, defaulting to `true`
This commit is contained in:
parent
4c96aa5c95
commit
ea77f3f349
6 changed files with 28 additions and 1 deletions
|
@ -0,0 +1,16 @@
|
||||||
|
const logging = require('../../../../../shared/logging');
|
||||||
|
const {createTransactionalMigration} = require('../../utils');
|
||||||
|
|
||||||
|
module.exports = createTransactionalMigration(
|
||||||
|
|
||||||
|
async function up(connection) {
|
||||||
|
logging.info('Updating email_track_opens setting to email group');
|
||||||
|
await connection('settings')
|
||||||
|
.whereIn('key', ['email_track_opens'])
|
||||||
|
.update({
|
||||||
|
group: 'email'
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
async function down() {}
|
||||||
|
);
|
|
@ -353,6 +353,14 @@
|
||||||
"mailgun_base_url": {
|
"mailgun_base_url": {
|
||||||
"defaultValue": null,
|
"defaultValue": null,
|
||||||
"type": "string"
|
"type": "string"
|
||||||
|
},
|
||||||
|
"email_track_opens": {
|
||||||
|
"defaultValue": "true",
|
||||||
|
"validations": {
|
||||||
|
"isEmpty": false,
|
||||||
|
"isIn": [["true", "false"]]
|
||||||
|
},
|
||||||
|
"type": "boolean"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"amp": {
|
"amp": {
|
||||||
|
|
|
@ -59,6 +59,7 @@ const defaultSettingsKeyTypes = [
|
||||||
{key: 'mailgun_api_key', type: 'bulk_email'},
|
{key: 'mailgun_api_key', type: 'bulk_email'},
|
||||||
{key: 'mailgun_domain', type: 'bulk_email'},
|
{key: 'mailgun_domain', type: 'bulk_email'},
|
||||||
{key: 'mailgun_base_url', type: 'bulk_email'},
|
{key: 'mailgun_base_url', type: 'bulk_email'},
|
||||||
|
{key: 'email_track_opens', type: 'bulk_email'},
|
||||||
{key: 'amp', type: 'blog'},
|
{key: 'amp', type: 'blog'},
|
||||||
{key: 'amp_gtag_id', type: 'blog'},
|
{key: 'amp_gtag_id', type: 'blog'},
|
||||||
{key: 'labs', type: 'blog'},
|
{key: 'labs', type: 'blog'},
|
||||||
|
|
|
@ -56,6 +56,7 @@ const defaultSettingsKeyTypes = [
|
||||||
{key: 'mailgun_api_key', type: 'bulk_email'},
|
{key: 'mailgun_api_key', type: 'bulk_email'},
|
||||||
{key: 'mailgun_domain', type: 'bulk_email'},
|
{key: 'mailgun_domain', type: 'bulk_email'},
|
||||||
{key: 'mailgun_base_url', type: 'bulk_email'},
|
{key: 'mailgun_base_url', type: 'bulk_email'},
|
||||||
|
{key: 'email_track_opens', type: 'bulk_email'},
|
||||||
{key: 'amp', type: 'blog'},
|
{key: 'amp', type: 'blog'},
|
||||||
{key: 'amp_gtag_id', type: 'blog'},
|
{key: 'amp_gtag_id', type: 'blog'},
|
||||||
{key: 'labs', type: 'blog'},
|
{key: 'labs', type: 'blog'},
|
||||||
|
|
|
@ -59,6 +59,7 @@ const defaultSettingsKeys = [
|
||||||
'mailgun_api_key',
|
'mailgun_api_key',
|
||||||
'mailgun_domain',
|
'mailgun_domain',
|
||||||
'mailgun_base_url',
|
'mailgun_base_url',
|
||||||
|
'email_track_opens',
|
||||||
'amp',
|
'amp',
|
||||||
'amp_gtag_id',
|
'amp_gtag_id',
|
||||||
'labs',
|
'labs',
|
||||||
|
|
|
@ -34,7 +34,7 @@ describe('DB version integrity', function () {
|
||||||
// Only these variables should need updating
|
// Only these variables should need updating
|
||||||
const currentSchemaHash = 'ce6d902fd2b0e3921ffb76d61a35e285';
|
const currentSchemaHash = 'ce6d902fd2b0e3921ffb76d61a35e285';
|
||||||
const currentFixturesHash = 'd46d696c94d03e41a5903500547fea77';
|
const currentFixturesHash = 'd46d696c94d03e41a5903500547fea77';
|
||||||
const currentSettingsHash = 'b7c0c2c6a4c61561dfefe642470d30f8';
|
const currentSettingsHash = 'd3821715e4b34d92d6ba6ed0d4918f5c';
|
||||||
const currentRoutesHash = '3d180d52c663d173a6be791ef411ed01';
|
const currentRoutesHash = '3d180d52c663d173a6be791ef411ed01';
|
||||||
|
|
||||||
// If this test is failing, then it is likely a change has been made that requires a DB version bump,
|
// If this test is failing, then it is likely a change has been made that requires a DB version bump,
|
||||||
|
|
Loading…
Add table
Reference in a new issue