From c5a34c534b987a5767db7757699453cb14991c14 Mon Sep 17 00:00:00 2001 From: Aaron Francis Date: Thu, 3 Oct 2013 16:33:28 -0500 Subject: [PATCH] Fix Issue #934 Fixes issue #934. Command is created for the selected database, not the default database. --- framework/yii/console/controllers/MigrateController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/yii/console/controllers/MigrateController.php b/framework/yii/console/controllers/MigrateController.php index e2c771c..e9e3973 100644 --- a/framework/yii/console/controllers/MigrateController.php +++ b/framework/yii/console/controllers/MigrateController.php @@ -584,7 +584,7 @@ class MigrateController extends Controller ->from($this->migrationTable) ->orderBy('version DESC') ->limit($limit) - ->createCommand() + ->createCommand($this->db) ->queryAll(); $history = ArrayHelper::map($rows, 'version', 'apply_time'); unset($history[self::BASE_MIGRATION]);