protected function createIndex($name, array $columns)
    {
        $index = new Index($name);
        $index->setColumns($columns);
        $index->resetColumnsSize();

        $this->addIndex($index);

        return $index;
    }
protected function createIndex($name, array $columns)
    {
        $index = new Index($name);
        $index->setColumns($columns);
        $index->resetColumnsSize();

        $this->addIndex($index);

        return $index;
    }
protected function createIndex ( $ name , array $ columns ) { $ index = new Index ( $ name ) ; $ index -> setColumns ( $ columns ) ; $ index -> resetColumnsSize ( ) ; $ this -> addIndex ( $ index ) ; return $ index ; }
Creates a new index.

@param  string $name    The index name
@param  array  $columns The list of columns to index
@return Index  $index   The created index
Creates a new index .