mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-16 06:07:21 +01:00
chore(contribs_plan): add migration so contribl.lvl >= 7 gets free
plan4life
This commit is contained in:
23
migrations/contribs_plan.js
Normal file
23
migrations/contribs_plan.js
Normal file
@@ -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}
|
||||||
|
|
||||||
|
)
|
||||||
Reference in New Issue
Block a user