registerDartMigration method
Implementation
FinchApp registerDartMigration(List<DartMigration> migrations) {
// validate unique migration names
for (var migration in migrations) {
if (_dartMigrations
.where((m) => m.uniqueName == migration.uniqueName)
.isNotEmpty) {
Console.e(
"Application Error: \n"
"Class: $migration\n"
"Migration with name '${migration.uniqueName}'"
" is not unique. Please ensure all migration names are unique.",
);
// Exit the application with a non-zero status code to indicate an error
exit(1);
}
_dartMigrations.add(migration.register(this));
}
return this;
}