Commit f9024dbe by Carsten Brandt

fixed Migration::execute() to use params correctly

parent da07230a
......@@ -1276,8 +1276,8 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface
/**
* @param array $link
* @param ActiveRecord $foreignModel
* @param ActiveRecord $primaryModel
* @param BaseActiveRecord $foreignModel
* @param BaseActiveRecord $primaryModel
* @throws InvalidCallException
*/
private function bindModels($link, $foreignModel, $primaryModel)
......
......@@ -139,7 +139,7 @@ class Migration extends \yii\base\Component
{
echo " > execute SQL: $sql ...";
$time = microtime(true);
$this->db->createCommand($sql)->execute($params);
$this->db->createCommand($sql)->bindValues($params)->execute();
echo " done (time: " . sprintf('%.3f', microtime(true) - $time) . "s)\n";
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment