Fixes #7924: Migrations in history are now ordered by time applied allowing to roll back in reverse order no matter how these were applied

This commit is contained in:
Alexander Makarov
2015-03-31 16:56:33 +03:00
parent 932afe9113
commit 1713a99c79
2 changed files with 2 additions and 1 deletions

View File

@@ -30,6 +30,7 @@ Yii Framework 2 Change Log
- Enh: Added `yii\helper\Console::wrapText()` method to wrap indented text by console window width and used it in `yii help` command (cebe)
- Enh: Implement batchInsert for oci (nineinchnick)
- Enh: Detecting IntegrityException for oci (nineinchnick)
- Chg #7924: Migrations in history are now ordered by time applied allowing to roll back in reverse order no matter how these were applied (samdark)
- Chg: Updated dependency to `cebe/markdown` to version `1.1.x` (cebe)

View File

@@ -124,7 +124,7 @@ class MigrateController extends BaseMigrateController
$query = new Query;
$rows = $query->select(['version', 'apply_time'])
->from($this->migrationTable)
->orderBy('version DESC')
->orderBy('apply_time DESC')
->limit($limit)
->createCommand($this->db)
->queryAll();