0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00

Updated portal button setting to false

no issue

- Existing and new sites should have portal button hidden by default and need explicit switch on from Admin.
- Default value for new sites has been updated, but existing sites still have old default and portal button set as true
- Migration here resets portal button setting to false for all existing sites, and they'll need to be explicitly turn it on from admin again
This commit is contained in:
Rish 2020-07-06 11:02:25 +05:30 committed by Rishabh Garg
parent 3c21b45ad8
commit 8675a7d317

View file

@ -0,0 +1,24 @@
const logging = require('../../../../../shared/logging');
module.exports = {
config: {
transaction: true
},
async up(options) {
// update portal button setting to false
logging.info(`Updating portal button setting to false`);
return await options
.transacting('settings')
.where('key', 'portal_button')
.update({
value: 'false'
});
},
// `up` is only run to fix previously set default value for portal button,
// it doesn't make sense to be revert it back as `true` as feature is still behind dev flag
async down() {
return Promise.resolve();
}
};