diff --git a/angel_migration_runner/CHANGELOG.md b/angel_migration_runner/CHANGELOG.md index a22ee51a..4aca2199 100755 --- a/angel_migration_runner/CHANGELOG.md +++ b/angel_migration_runner/CHANGELOG.md @@ -1,3 +1,6 @@ +# 2.0.0-beta.0 +* Make `reset` reverse migrations. + # 2.0.0-alpha.5 * Support default values for columns. diff --git a/angel_migration_runner/lib/src/postgres/runner.dart b/angel_migration_runner/lib/src/postgres/runner.dart index 97220159..ad8e33b9 100755 --- a/angel_migration_runner/lib/src/postgres/runner.dart +++ b/angel_migration_runner/lib/src/postgres/runner.dart @@ -61,7 +61,7 @@ class PostgresMigrationRunner implements MigrationRunner { int curBatch = (r[0][0] ?? 0) as int; int batch = curBatch + 1; - for (var k in toRun) { + for (var k in toRun.reversed) { var migration = migrations[k]; var schema = new PostgresSchema(); migration.up(schema); diff --git a/angel_migration_runner/pubspec.yaml b/angel_migration_runner/pubspec.yaml index 7ac7d7ab..e339083b 100755 --- a/angel_migration_runner/pubspec.yaml +++ b/angel_migration_runner/pubspec.yaml @@ -1,5 +1,5 @@ name: angel_migration_runner -version: 2.0.0-alpha.5 +version: 2.0.0-beta.0 description: Command-line based database migration runner for Angel's ORM. author: Tobe O homepage: https://github.com/angel-dart/migration