diff --git a/migrations/mystery_items.js b/migrations/mystery_items.js index 9a7b37eec4..611544f294 100644 --- a/migrations/mystery_items.js +++ b/migrations/mystery_items.js @@ -27,6 +27,9 @@ if (_id) { db.users.update({_id:_id}, update); } else { // multiple (once @ start of event) - db.users.update({$and: [{'purchased.plan.customerId':{$ne:null}},{$or: [{'purchased.plan.dateTerminated':{$gte:new Date()}},{'purchased.plan.dateTerminated':{$eq:null}}]}]}, update, {multi:true}); -} - + db.users.update([{$and: [{'purchased.plan.customerId':{$ne:null}}, + {$or: [{'purchased.plan.dateTerminated':{$gte:new Date()}}, + {'purchased.plan.dateTerminated':{$exists:false}}, + {'purchased.plan.dateTerminated':{$eq:null}}]}]}], update, {multi:true}); + }); +} \ No newline at end of file