public function addIndex($name)
    {
        if ($this->scope == 'alter') {
            $command = 'ADD INDEX';
        } else {
            $command = 'INDEX';
        }

        $this->sqls[] = sprintf('%s `%s`', $command, $name);

        return $this;
    }
public function addIndex($name)
    {
        if ($this->scope == 'alter') {
            $command = 'ADD INDEX';
        } else {
            $command = 'INDEX';
        }

        $this->sqls[] = sprintf('%s `%s`', $command, $name);

        return $this;
    }
public function addIndex ( $ name ) { if ( $ this -> scope == 'alter' ) { $ command = 'ADD INDEX' ; } else { $ command = 'INDEX' ; } $ this -> sqls [ ] = sprintf ( '%s `%s`' , $ command , $ name ) ; return $ this ; }
Add table index;

@param string $name

@return SQLGenerator
Add table index ;