Skip to content

Commit

Permalink
Merge branch 'kylestratis-issue-6043' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
Alys committed Nov 28, 2015
2 parents 046e7bc + 7bf5300 commit 42d1fd9
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions migrations/mystery_items.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,15 @@ var update = {

if (_id) {
// singular (missing items)
db.users.update({_id:_id}, update);
db.users.update({_id: _id}, update);
} else {
// multiple (once @ start of event)
db.users.update({'purchased.plan.customerId':{$ne:null}}, update, {multi:true});
db.users.update({
'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 });
}

0 comments on commit 42d1fd9

Please sign in to comment.