yii\db\Migration::execute PHP Метод

execute() публичный Метод

This method executes the specified SQL statement using [[db]].
public execute ( string $sql, array $params = [] )
$sql string the SQL statement to be executed
$params array input parameters (name => value) for the SQL execution. See [[Command::execute()]] for more details.
    public function execute($sql, $params = [])
    {
        echo "    > execute SQL: {$sql} ...";
        $time = microtime(true);
        $this->db->createCommand($sql)->bindValues($params)->execute();
        echo ' done (time: ' . sprintf('%.3f', microtime(true) - $time) . "s)\n";
    }