Files
talk/migrations/1507322128_dontagree.js
T
Wyatt Johnson 86c3c286ee Graph fixes and migrations
- Added migrations for mapping old keys
- Added migration for fixing old dont agree flags
- Removed enum requirement for output
2017-10-10 11:22:19 -06:00

22 lines
434 B
JavaScript

const ActionModel = require('../models/action');
module.exports = {
async up() {
// This will update all the old flags that are 'COMMENT_NOAGREE' to change
// them to DONTAGREE actions instead.
return ActionModel.update({
action_type: 'FLAG',
group_id: 'COMMENT_NOAGREE',
}, {
$set: {
action_type: 'DONTAGREE',
group_id: null,
},
}, {
multi: true,
});
}
};