mirror of
https://github.com/HabitRPG/habitica.git
synced 2026-05-24 11:49:12 -05:00
tags: add migration to set initial empty tags to an array - why was it
being set to an object?
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
/**
|
||||
* users getting broken tags when they try to edit the first blank tag on accident
|
||||
*
|
||||
* mongo habitrpg ./node_modules/underscore/underscore.js ./migrations/20130507_fix_broken_tags.js
|
||||
*/
|
||||
|
||||
db.users.find().forEach(function(user){
|
||||
if(!_.isArray(user.tags)) {
|
||||
db.users.update({_id:user._id}, {$set:{tags:[]}});
|
||||
}
|
||||
|
||||
})
|
||||
@@ -0,0 +1 @@
|
||||
db.users.update({},{$set:{'flags.newStuff':'show'}},{multi:true})
|
||||
Reference in New Issue
Block a user