diff --git a/src/index.js b/src/index.js index f43c33f..3e1615e 100644 --- a/src/index.js +++ b/src/index.js @@ -61,8 +61,8 @@ process.on('unhandledRejection', err => { (async function() { // Make sure the database is up to date - const migrationDelta = await knex.migrate.status(); - if (migrationDelta !== 0) { + const [completed, newMigrations] = await knex.migrate.list(); + if (newMigrations.length > 0) { console.log('Updating database. This can take a while. Don\'t close the bot!'); await knex.migrate.latest(); console.log('Done!');