mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-21 19:24:15 +00:00
chore(contribs_plan): add migration so contribl.lvl >= 7 gets free
plan4life
This commit is contained in:
parent
c8faffcc72
commit
8ba12ef392
1 changed files with 23 additions and 0 deletions
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}
|
||||
|
||||
)
|
||||
Loading…
Reference in a new issue