execute method

  1. @override
void execute(
  1. List<String> arguments
)
override

Implementation

@override
void execute(List<String> arguments) async {
  print('\x1B[32m Migration started \x1B[0m');
  Process process = await Process.start('dart', [
    'run',
    '${Directory.current.path}/lib/database/migrations/migrate.dart'
  ]);

  await for (var data in process.stdout.transform(utf8.decoder)) {
    List lines = data.split("\n");
    for (String line in lines) {
      if (line.isNotEmpty) {
        print(line);
      }
    }
  }
}