src/Phinx/Db/Adapter/MysqlAdapter.php 1 location
|
@@ 480-485 (lines=6) @@
|
| 477 |
|
{ |
| 478 |
|
$indexes = []; |
| 479 |
|
$rows = $this->fetchAll(sprintf('SHOW INDEXES FROM %s', $this->quoteTableName($tableName))); |
| 480 |
|
foreach ($rows as $row) { |
| 481 |
|
if (!isset($indexes[$row['Key_name']])) { |
| 482 |
|
$indexes[$row['Key_name']] = ['columns' => []]; |
| 483 |
|
} |
| 484 |
|
$indexes[$row['Key_name']]['columns'][] = strtolower($row['Column_name']); |
| 485 |
|
} |
| 486 |
|
|
| 487 |
|
return $indexes; |
| 488 |
|
} |
src/Phinx/Db/Adapter/PostgresAdapter.php 1 location
|
@@ 525-530 (lines=6) @@
|
| 522 |
|
$this->getConnection()->quote($parts['table']) |
| 523 |
|
); |
| 524 |
|
$rows = $this->fetchAll($sql); |
| 525 |
|
foreach ($rows as $row) { |
| 526 |
|
if (!isset($indexes[$row['index_name']])) { |
| 527 |
|
$indexes[$row['index_name']] = ['columns' => []]; |
| 528 |
|
} |
| 529 |
|
$indexes[$row['index_name']]['columns'][] = $row['column_name']; |
| 530 |
|
} |
| 531 |
|
|
| 532 |
|
return $indexes; |
| 533 |
|
} |