src/Phinx/Db/Adapter/PostgresAdapter.php 1 location
|
@@ 636-641 (lines=6) @@
|
633 |
|
$this->getConnection()->quote($parts['table']) |
634 |
|
); |
635 |
|
$rows = $this->fetchAll($sql); |
636 |
|
foreach ($rows as $row) { |
637 |
|
if (!isset($indexes[$row['index_name']])) { |
638 |
|
$indexes[$row['index_name']] = ['columns' => []]; |
639 |
|
} |
640 |
|
$indexes[$row['index_name']]['columns'][] = $row['column_name']; |
641 |
|
} |
642 |
|
|
643 |
|
return $indexes; |
644 |
|
} |
src/Phinx/Db/Adapter/MysqlAdapter.php 1 location
|
@@ 553-558 (lines=6) @@
|
550 |
|
{ |
551 |
|
$indexes = []; |
552 |
|
$rows = $this->fetchAll(sprintf('SHOW INDEXES FROM %s', $this->quoteTableName($tableName))); |
553 |
|
foreach ($rows as $row) { |
554 |
|
if (!isset($indexes[$row['Key_name']])) { |
555 |
|
$indexes[$row['Key_name']] = ['columns' => []]; |
556 |
|
} |
557 |
|
$indexes[$row['Key_name']]['columns'][] = strtolower($row['Column_name']); |
558 |
|
} |
559 |
|
|
560 |
|
return $indexes; |
561 |
|
} |