src/Db/Migration.php
protected function createCommand($sql = null, $params = [], $connection = null)
    {
        if ($connection === null && isset($this->_connection)) {
            $connection = $this->_connection;
        }
        return $this->db->createCommand($sql, $params, $connection);
    }
protected function createCommand($sql = null, $params = [], $connection = null)
    {
        if ($connection === null && isset($this->_connection)) {
            $connection = $this->_connection;
        }
        return $this->db->createCommand($sql, $params, $connection);
    }
Create DB command
@param string|null              $sql
@param array                    $params
@param ConnectionInterface|null $connection
@return CommandInterface