Skip to content

Commit

Permalink
fix: don't throw an error if there are no migrations to run
Browse files Browse the repository at this point in the history
  • Loading branch information
balmasi committed Jul 6, 2019
1 parent e3707d1 commit 3ee337c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/lib.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,6 @@ export default class Migrator {
this.log(`Current Migrations' Statuses: `);
await this.list();
}
throw new Error('There are no migrations to run');
}

let self = this;
Expand Down Expand Up @@ -230,7 +229,7 @@ export default class Migrator {
}
}

if (migrationsToRun.length == numMigrationsRan) this.log('All migrations finished successfully.'.green);
if (migrationsToRun.length == numMigrationsRan && numMigrationsRan > 0) this.log('All migrations finished successfully.'.green);
return migrationsRan;
}

Expand Down

0 comments on commit 3ee337c

Please sign in to comment.