src/Phinx/Db/Adapter/SqlServerAdapter.php
protected function getIndexSqlDefinition(Index $index, $tableName)
    {
        if (is_string($index->getName())) {
            $indexName = $index->getName();
        } else {
            $columnNames = $index->getColumns();
            $indexName = sprintf('%s_%s', $tableName, implode('_', $columnNames));
        }
        $def = sprintf(
            "CREATE %s INDEX %s ON %s (%s);",
            ($index->getType() === Index::UNIQUE ? 'UNIQUE' : ''),
            $indexName,
            $this->quoteTableName($tableName),
            '[' . implode('],[', $index->getColumns()) . ']'
        );

        return $def;
    }
protected function getIndexSqlDefinition(Index $index, $tableName)
    {
        if (is_string($index->getName())) {
            $indexName = $index->getName();
        } else {
            $columnNames = $index->getColumns();
            $indexName = sprintf('%s_%s', $tableName, implode('_', $columnNames));
        }
        $def = sprintf(
            "CREATE %s INDEX %s ON %s (%s);",
            ($index->getType() === Index::UNIQUE ? 'UNIQUE' : ''),
            $indexName,
            $this->quoteTableName($tableName),
            '[' . implode('],[', $index->getColumns()) . ']'
        );

        return $def;
    }
protected function getIndexSqlDefinition ( Index $ index , $ tableName ) { if ( is_string ( $ index -> getName ( ) ) ) { $ indexName = $ index -> getName ( ) ; } else { $ columnNames = $ index -> getColumns ( ) ; $ indexName = sprintf ( '%s_%s' , $ tableName , implode ( '_' , $ columnNames ) ) ; } $ def = sprintf ( "CREATE %s INDEX %s ON %s (%s);" , ( $ index -> getType ( ) === Index :: UNIQUE ? 'UNIQUE' : '' ) , $ indexName , $ this -> quoteTableName ( $ tableName ) , '[' . implode ( '],[' , $ index -> getColumns ( ) ) . ']' ) ; return $ def ; }
Gets the SqlServer Index Definition for an Index object.

@param \Phinx\Db\Table\Index $index Index
@return string
Gets the SqlServer Index Definition for an Index object .