From 8ba12ef39287754bab130bb7635703809abf5f4e Mon Sep 17 00:00:00 2001 From: Tyler Renelle Date: Thu, 13 Feb 2014 11:54:45 -0700 Subject: [PATCH] chore(contribs_plan): add migration so contribl.lvl >= 7 gets free plan4life --- migrations/contribs_plan.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 migrations/contribs_plan.js diff --git a/migrations/contribs_plan.js b/migrations/contribs_plan.js new file mode 100644 index 0000000000..a08bd93f76 --- /dev/null +++ b/migrations/contribs_plan.js @@ -0,0 +1,23 @@ +// Give contrib.level 7+ free subscription for life +db.users.update( + + { + 'contributor.level':{$gte:7}, + 'purchased.plan.customerId':null + }, + + { + $set: { + 'purchased.plan':{ + planId: 'basic', + customerId: 'habitrpg', + dateCreated: new Date, + dateUpdated: new Date, + gemsBought: 0 + } + } + }, + + {multi:true} + +) \ No newline at end of file