mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-04-14 19:56:23 +00:00
[#923] also migrate group.websites => group.description (@Fandekasp the
user stuff is solid, thanks!)
This commit is contained in:
parent
aad8f80c9d
commit
5038885baf
1 changed files with 8 additions and 1 deletions
|
|
@ -2,6 +2,13 @@
|
|||
db.users.find({'profile.websites':{$exists: true}}).forEach(function(user){
|
||||
db.users.update({_id: user._id}, {
|
||||
$set: {"profile.blurb": user.profile.blurb + '\n * ' + user.profile.websites.join('\n * ')},
|
||||
$unset: {'profile.websites': ''}
|
||||
$unset: {'profile.websites': 1}
|
||||
})
|
||||
})
|
||||
|
||||
db.groups.find({'websites.0':{$exists: true}}).forEach(function(group){
|
||||
db.groups.update({_id: group._id}, {
|
||||
$set: {"description": group.description + '\n * ' + group.websites.join('\n * ')},
|
||||
$unset: {websites: 1}
|
||||
})
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in a new issue