Code Duplication    Length = 6-6 lines in 2 locations

src/Phinx/Db/Adapter/MysqlAdapter.php 1 location

@@ 485-490 (lines=6) @@
482
    {
483
        $indexes = [];
484
        $rows = $this->fetchAll(sprintf('SHOW INDEXES FROM %s', $this->quoteTableName($tableName)));
485
        foreach ($rows as $row) {
486
            if (!isset($indexes[$row['Key_name']])) {
487
                $indexes[$row['Key_name']] = ['columns' => []];
488
            }
489
            $indexes[$row['Key_name']]['columns'][] = strtolower($row['Column_name']);
490
        }
491
492
        return $indexes;
493
    }

src/Phinx/Db/Adapter/PostgresAdapter.php 1 location

@@ 529-534 (lines=6) @@
526
            $this->getConnection()->quote($parts['table'])
527
        );
528
        $rows = $this->fetchAll($sql);
529
        foreach ($rows as $row) {
530
            if (!isset($indexes[$row['index_name']])) {
531
                $indexes[$row['index_name']] = ['columns' => []];
532
            }
533
            $indexes[$row['index_name']]['columns'][] = $row['column_name'];
534
        }
535
536
        return $indexes;
537
    }