Skip to content

Commit 6211f33

Browse files
committed
Don't bail on migration if there were no indexes
1 parent 41af502 commit 6211f33

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

migrations/006-event-teams.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ exports.up = function(done) {
99
console.log('\nCreating team for each event');
1010

1111
mongoose.model('Team').collection.dropAllIndexes(function (err) {
12-
if (err) return done(err);
12+
if (err) {
13+
console.log('Could not drop indexes. If you are starting with an empty DB, you can ignore this error');
14+
}
1315

1416
Event.getEvents(function(err, events) {
1517
async.each(events, function(event, done) {

0 commit comments

Comments
 (0)