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:
parent
3c21b45ad8
commit
8675a7d317
1 changed files with 24 additions and 0 deletions
|
@ -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();
|
||||||
|
}
|
||||||
|
};
|
Loading…
Reference in a new issue