From e683e3e79d979f1fce20d55223c3d14ae26a9c0f Mon Sep 17 00:00:00 2001 From: Klimov Paul Date: Mon, 8 Jun 2015 11:32:09 +0300 Subject: [PATCH] Schema refresh moved to `Migration::init()`. --- framework/db/Migration.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/db/Migration.php b/framework/db/Migration.php index 7462a08..b43f5c5 100644 --- a/framework/db/Migration.php +++ b/framework/db/Migration.php @@ -66,6 +66,7 @@ class Migration extends Component implements MigrationInterface { parent::init(); $this->db = Instance::ensure($this->db, Connection::className()); + $this->db->getSchema()->refresh(); } /** @@ -162,7 +163,6 @@ class Migration extends Component implements MigrationInterface $time = microtime(true); $this->db->createCommand($sql)->bindValues($params)->execute(); echo " done (time: " . sprintf('%.3f', microtime(true) - $time) . "s)\n"; - $this->db->getSchema()->refresh(); // ensure possible schema changes applied } /**