execute method
Implementation
Future<int> execute() async
{
final executor = MigrationExecutor(
env: env,
password: password,
migrationsPath: migrationsPath,
);
try {
await executor.clean(handler: handler);
return resultOk;
} on AbortedException {
return resultError;
} on ConnectionException catch (e) {
console?.errorLn('Failed to connect: ${e.message}.');
return resultError;
} on MigrationException catch (e) {
console?.errorCLn('Failed to migrate the database: ${e.message}.');
return resultError;
} catch (e) {
console?.errorCLn('Failed to migrate the database: $e.');
return resultError;
}
}