mirror of
https://github.com/wassname/talk.git
synced 2026-07-05 15:19:32 +08:00
86c3c286ee
- Added migrations for mapping old keys - Added migration for fixing old dont agree flags - Removed enum requirement for output
22 lines
434 B
JavaScript
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,
|
|
});
|
|
}
|
|
};
|
|
|