runMigrations function

Future runMigrations(
  1. MigrationRunner migrationRunner,
  2. List<String> args
)

Runs the galileo Migration CLI.

Implementation

Future runMigrations(MigrationRunner migrationRunner, List<String> args) {
  var cmd = new CommandRunner('migration_runner', 'Executes Galileo migrations.')
    ..addCommand(new _UpCommand(migrationRunner))
    ..addCommand(new _RefreshCommand(migrationRunner))
    ..addCommand(new _ResetCommand(migrationRunner))
    ..addCommand(new _RollbackCommand(migrationRunner));
  return cmd.run(args).then((_) => migrationRunner.close());
}