diff --git a/bin/cli-migration b/bin/cli-migration index 83a84e29d..036ac8b02 100755 --- a/bin/cli-migration +++ b/bin/cli-migration @@ -32,15 +32,6 @@ async function runMigrations() { try { - // Get the migrations to run. - let migrations = await MigrationService.listPending(); - - console.log('Now going to run the following migrations:\n'); - - for (let {filename} of migrations) { - console.log(`\tmigrations/${filename}`); - } - let {backedUp} = await inquirer.prompt([ { type: 'confirm', @@ -54,6 +45,15 @@ async function runMigrations() { throw new Error('Please backup your databases prior to migrations occuring'); } + // Get the migrations to run. + let migrations = await MigrationService.listPending(); + + console.log('Now going to run the following migrations:\n'); + + for (let {filename} of migrations) { + console.log(`\tmigrations/${filename}`); + } + let {confirm} = await inquirer.prompt([ { type: 'confirm',