v3 migration: fix createdAt date

This commit is contained in:
Matteo Pagliazzi
2016-05-17 15:46:30 +02:00
parent 810e4cbd78
commit d648b0e0c8

View File

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