Code Duplication    Length = 6-6 lines in 2 locations

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

@@ 473-478 (lines=6) @@
470
    {
471
        $indexes = [];
472
        $rows = $this->fetchAll(sprintf('SHOW INDEXES FROM %s', $this->quoteTableName($tableName)));
473
        foreach ($rows as $row) {
474
            if (!isset($indexes[$row['Key_name']])) {
475
                $indexes[$row['Key_name']] = ['columns' => []];
476
            }
477
            $indexes[$row['Key_name']]['columns'][] = strtolower($row['Column_name']);
478
        }
479
480
        return $indexes;
481
    }

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

@@ 571-576 (lines=6) @@
568
            $this->getConnection()->quote($parts['table'])
569
        );
570
        $rows = $this->fetchAll($sql);
571
        foreach ($rows as $row) {
572
            if (!isset($indexes[$row['index_name']])) {
573
                $indexes[$row['index_name']] = ['columns' => []];
574
            }
575
            $indexes[$row['index_name']]['columns'][] = $row['column_name'];
576
        }
577
578
        return $indexes;
579
    }