mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-04-14 19:56:23 +00:00
fix problems with migrations and start firebase migration
This commit is contained in:
parent
45f2b093f8
commit
4bb2c33e40
2 changed files with 7 additions and 2 deletions
|
|
@ -33,6 +33,7 @@ dbGroups.findEach({}, {_id: 1, members: 1}, {batchSize: 500}, function(err, grou
|
|||
countUsers++;
|
||||
console.log('User: ', countUsers);
|
||||
|
||||
// TODO updating the same group many times concurrently can cause problems?
|
||||
dbGroups.update({
|
||||
_id: group._id
|
||||
}, {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Remove emoty groups
|
||||
* Remove empty private groups
|
||||
*/
|
||||
|
||||
var mongo = require('mongoskin');
|
||||
|
|
@ -13,7 +13,11 @@ var dbGroups = db.collection('groups');
|
|||
console.log('Begins work on db');
|
||||
|
||||
dbGroups.remove({
|
||||
members: {$size: 0}
|
||||
members: {$size: 0},
|
||||
$or: [
|
||||
{type: 'party'},
|
||||
{privacy: 'private'}
|
||||
]
|
||||
}, function(err, res){
|
||||
if(err) throw err;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue