v3: more verbose logging in production and fix migration bugs

This commit is contained in:
Matteo Pagliazzi
2016-05-07 15:01:40 +02:00
parent afb7d1d627
commit 4e3d4c8831
6 changed files with 48 additions and 41 deletions

View File

@@ -171,7 +171,7 @@ function processUsers (afterId) {
newUser.tasksOrder[`${oldTask.type}s`].push(oldTask._id);
}
var allTasksFields = ['_id', 'type', 'text', 'notes', 'tags', 'value', 'priority', 'attribute', 'challenge', 'reminders'];
var allTasksFields = ['_id', 'type', 'text', 'notes', 'tags', 'value', 'priority', 'attribute', 'challenge', 'reminders', 'userId', 'legacyId'];
// using mongoose models is too slow
if (oldTask.type === 'habit') {
oldTask = _.pick(oldTask, allTasksFields.concat(['history', 'up', 'down']));