run method

  1. @override
Future<void> run(
  1. List<String> args
)

run the command. args are the words after the name.

Implementation

@override
Future<void> run(List<String> args) async {
  String? path = _migrations.create('create_queue_tables', source);
  if (path == null) {
    print('A create_queue_tables migration is already in db/migration.');
    exitCode = 1;
    return;
  }
  String file = File(path).uri.pathSegments.last;
  print('\x1B[32m$file migration created successfully.\x1B[0m');
  print('Run `dox migrate` to make the tables.');
}