make it easier to re-run puzzle migration
parent
6f3b94d944
commit
0c0d06e627
|
@ -2,7 +2,9 @@ var puzzles = db.puzzle;
|
|||
|
||||
modified = 0;
|
||||
|
||||
puzzles.find().forEach(function(p) {
|
||||
puzzles.find({
|
||||
'vote.ratio': {'$exists': false}
|
||||
}).forEach(function(p) {
|
||||
puzzles.update({
|
||||
_id: p._id
|
||||
}, {
|
||||
|
@ -14,4 +16,4 @@ puzzles.find().forEach(function(p) {
|
|||
modified += 1;
|
||||
});
|
||||
|
||||
print(modified);
|
||||
print(modified);
|
||||
|
|
Loading…
Reference in New Issue