mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-20 02:34:12 +00:00
achievements: add migration for survey achievements
This commit is contained in:
parent
bba008bd61
commit
c1cda30582
1 changed files with 20 additions and 0 deletions
20
migrations/20130602_survey_rewards.js
Normal file
20
migrations/20130602_survey_rewards.js
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
//mongo habitrpg ./node_modules/lodash/lodash.js migrations/20130602_survey_rewards.js
|
||||
|
||||
var members = [];
|
||||
members = _.uniq(members);
|
||||
print(members.length)
|
||||
|
||||
db.users.update({
|
||||
_id: {$exists:1},
|
||||
$or:[
|
||||
{_id: {$in: members}},
|
||||
// {'profile.name': {$in: members}},
|
||||
{'auth.facebook.name': {$in: members}},
|
||||
{'auth.local.username': {$in: members}},
|
||||
{'auth.local.email': {$in: members}}
|
||||
]
|
||||
},
|
||||
{
|
||||
$set: { 'achievements.helpedHabit': true },
|
||||
$inc: { balance: (2.5) }
|
||||
})
|
||||
Loading…
Reference in a new issue