/** * Creates a comma-separated list of column names for the index. * For MySQL unique indexes there is the option of specifying size, so we cannot simply use * the getColumnsList() method. * @param Index $index * @return string */ private function getIndexColumnList(Index $index) { $platform = $this->getPlatform(); $cols = $index->getColumns(); $list = array(); foreach ($cols as $col) { $list[] = $this->quoteIdentifier($col) . ($index->hasColumnSize($col) ? '(' . $index->getColumnSize($col) . ')' : ''); } return implode(', ', $list); }
/** * Creates a comma-separated list of column names for the index. * For MySQL unique indexes there is the option of specifying size, so we cannot simply use * the getColumnsList() method. * @param Index $index * @return string */ protected function getIndexColumnListDDL(Index $index) { $list = array(); foreach ($index->getColumns() as $col) { $list[] = $this->quoteIdentifier($col) . ($index->hasColumnSize($col) ? '(' . $index->getColumnSize($col) . ')' : ''); } return implode(', ', $list); }