From 6a5210d3ad728e5d06d8d61cdce372c15f2889ff Mon Sep 17 00:00:00 2001 From: Alice Harris Date: Sat, 17 Jan 2015 16:45:55 +1000 Subject: [PATCH] fix(plans): when gifting subscription, set plan.dateUpdated so it can roll gemCapExtra next month. Fixes #4480. Removes datedUpdated from previous version of fix. --- migrations/20150107_plan_dateUpdated_null.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/migrations/20150107_plan_dateUpdated_null.js b/migrations/20150107_plan_dateUpdated_null.js index ae231a0414..6e03b41a55 100644 --- a/migrations/20150107_plan_dateUpdated_null.js +++ b/migrations/20150107_plan_dateUpdated_null.js @@ -1,5 +1,8 @@ db.users.update( {'purchased.plan.customerId':{$ne:null}, 'purchased.plan.dateUpdated':null}, - {$set: {'purchased.plan.datedUpdated': new Date('12/01/2014')}}, + { + $set: {'purchased.plan.dateUpdated': new Date('12/01/2014')}, + $unset: {'purchased.plan.datedUpdated':''} + }, {multi:true} -); \ No newline at end of file +);