diff --git a/server/migrations/moveBucket.js b/server/migrations/moveBucket.js index aeaa4b78..21054b66 100644 --- a/server/migrations/moveBucket.js +++ b/server/migrations/moveBucket.js @@ -24,9 +24,11 @@ mongoose.connection.on('error', () => { // }, // }); -const numProjects = Project.count({}); -console.log(numProjects); -process.exit(0); +Project.count({}) +.exec().then((err, count) => { + console.log(count); + process.exit(0); +}); // Project.find({}, (err, projects) => { // projects.forEach((project, projectIndex) => {