Code Duplication    Length = 4-4 lines in 2 locations

src/database/Postgres.php 2 locations

@@ 1482-1485 (lines=4) @@
1479
                $sql .= $cons->fields['consrc'];
1480
            } else {
1481
                switch ($cons->fields['contype']) {
1482
                    case 'p':
1483
                        $keys = $this->getAttributeNames($table, explode(' ', $cons->fields['indkey']));
1484
                        $sql .= 'PRIMARY KEY ('.implode(',', $keys).')';
1485
                        break;
1486
                    case 'u':
1487
                        $keys = $this->getAttributeNames($table, explode(' ', $cons->fields['indkey']));
1488
                        $sql .= 'UNIQUE ('.implode(',', $keys).')';
@@ 1486-1489 (lines=4) @@
1483
                        $keys = $this->getAttributeNames($table, explode(' ', $cons->fields['indkey']));
1484
                        $sql .= 'PRIMARY KEY ('.implode(',', $keys).')';
1485
                        break;
1486
                    case 'u':
1487
                        $keys = $this->getAttributeNames($table, explode(' ', $cons->fields['indkey']));
1488
                        $sql .= 'UNIQUE ('.implode(',', $keys).')';
1489
                        break;
1490
                    default:
1491
                        // Unrecognised constraint
1492
                        $this->rollbackTransaction();