Files
Thomas Lynch 7d733840ae Update migration to also set global: false for completeness
update version and migrateVersion in package.json
2024-05-04 18:38:10 +10:00

25 lines
349 B
JavaScript

'use strict';
module.exports = async(db) => {
console.log('Updating all bans to have new global true/false flag');
await db.collection('bans').updateMany({
board: null,
}, {
'$set': {
'global': true,
},
});
await db.collection('bans').updateMany({
board: {
'$ne': null,
},
}, {
'$set': {
'global': false,
},
});
};