expandMigrations static method
Implementation
@visibleForTesting
static List<MigrationCommand> expandMigrations(Set<Migration> migrations) {
final sorted = migrations.toList();
sorted.sort((a, b) {
if (a.version == b.version) {
return 0;
}
return a.version > b.version ? 1 : -1;
});
return sorted.map((m) => m.up).expand((c) => c).toList();
}