0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00

Revert "Added migrations for support and reply email address setting (#12163)"

This reverts commit 2216019a86.
This commit is contained in:
Rish 2020-08-31 14:25:29 +05:30
parent eb8c0fcff9
commit 8cf9dc05e3
7 changed files with 1 additions and 67 deletions

View file

@ -1,27 +0,0 @@
const logging = require('../../../../../shared/logging');
module.exports = {
config: {
transaction: true
},
async up({transacting: knex}) {
const fromAddressSetting = await knex('settings')
.select('value')
.where('key', 'members_from_address')
.first();
const fromAddressValue = fromAddressSetting ? fromAddressSetting.value : 'noreply';
logging.info(`Updating members_support_address setting to members group with value ${fromAddressValue}`);
await knex('settings')
.update({
group: 'members',
flags: 'RO',
value: fromAddressValue
})
.where({
key: 'members_support_address'
});
},
async down() {}
};

View file

@ -1,20 +0,0 @@
const logging = require('../../../../../shared/logging');
module.exports = {
config: {
transaction: true
},
async up({transacting: knex}) {
logging.info('Updating members_reply_address setting to members group');
await knex('settings')
.update({
group: 'members'
})
.where({
key: 'members_reply_address'
});
},
async down() {}
};

View file

@ -241,19 +241,6 @@
"flags": "RO",
"type": "string"
},
"members_support_address": {
"defaultValue": "noreply",
"flags": "RO",
"type": "string"
},
"members_reply_address": {
"defaultValue": "newsletter",
"validations": {
"isEmpty": false,
"isIn": [["newsletter", "support"]]
},
"type": "string"
},
"stripe_product_name": {
"defaultValue": "Ghost Subscription",
"type": "string"

View file

@ -37,8 +37,6 @@ const defaultSettingsKeyTypes = [
{key: 'default_content_visibility', type: 'members'},
{key: 'members_allow_free_signup', type: 'members'},
{key: 'members_from_address', type: 'members'},
{key: 'members_support_address', type: 'members'},
{key: 'members_reply_address', type: 'members'},
{key: 'stripe_product_name', type: 'members'},
{key: 'stripe_plans', type: 'members'},
{key: 'stripe_secret_key', type: 'members'},

View file

@ -34,8 +34,6 @@ const defaultSettingsKeyTypes = [
{key: 'default_content_visibility', type: 'members'},
{key: 'members_allow_free_signup', type: 'members'},
{key: 'members_from_address', type: 'members'},
{key: 'members_support_address', type: 'members'},
{key: 'members_reply_address', type: 'members'},
{key: 'stripe_product_name', type: 'members'},
{key: 'stripe_plans', type: 'members'},
{key: 'stripe_secret_key', type: 'members'},

View file

@ -37,8 +37,6 @@ const defaultSettingsKeys = [
'default_content_visibility',
'members_allow_free_signup',
'members_from_address',
'members_support_address',
'members_reply_address',
'stripe_product_name',
'stripe_plans',
'stripe_secret_key',

View file

@ -23,7 +23,7 @@ describe('DB version integrity', function () {
// Only these variables should need updating
const currentSchemaHash = '42a966364eb4b5851e807133374821da';
const currentFixturesHash = '29148c40dfaf4f828c5fca95666f6545';
const currentSettingsHash = '869f7b14a3cc67c2e422b75c31b98dc4';
const currentSettingsHash = 'a4ac78d3810175428b4833645231d6d5';
// If this test is failing, then it is likely a change has been made that requires a DB version bump,
// and the values above will need updating as confirmation