src/Phinx/Db/Adapter/PostgresAdapter.php 1 location
|
@@ 643-648 (lines=6) @@
|
| 640 |
|
$this->getConnection()->quote($parts['table']) |
| 641 |
|
); |
| 642 |
|
$rows = $this->fetchAll($sql); |
| 643 |
|
foreach ($rows as $row) { |
| 644 |
|
if (!isset($indexes[$row['index_name']])) { |
| 645 |
|
$indexes[$row['index_name']] = ['columns' => []]; |
| 646 |
|
} |
| 647 |
|
$indexes[$row['index_name']]['columns'][] = $row['column_name']; |
| 648 |
|
} |
| 649 |
|
|
| 650 |
|
return $indexes; |
| 651 |
|
} |
src/Phinx/Db/Adapter/MysqlAdapter.php 1 location
|
@@ 558-563 (lines=6) @@
|
| 555 |
|
{ |
| 556 |
|
$indexes = []; |
| 557 |
|
$rows = $this->fetchAll(sprintf('SHOW INDEXES FROM %s', $this->quoteTableName($tableName))); |
| 558 |
|
foreach ($rows as $row) { |
| 559 |
|
if (!isset($indexes[$row['Key_name']])) { |
| 560 |
|
$indexes[$row['Key_name']] = ['columns' => []]; |
| 561 |
|
} |
| 562 |
|
$indexes[$row['Key_name']]['columns'][] = strtolower($row['Column_name']); |
| 563 |
|
} |
| 564 |
|
|
| 565 |
|
return $indexes; |
| 566 |
|
} |