Code Duplication    Length = 8-8 lines in 3 locations

src/database/Postgres.php 1 location

@@ 2964-2971 (lines=8) @@
2961
        }
2962
2963
        // Rename the column, if it has been changed
2964
        if ($column != $name) {
2965
            $status = $this->renameColumn($table, $column, $name);
2966
            if ($status != 0) {
2967
                $this->rollbackTransaction();
2968
2969
                return [-4, $sql];
2970
            }
2971
        }
2972
2973
        $f_schema = $this->_schema;
2974
        $this->fieldClean($f_schema);

src/database/Postgres74.php 2 locations

@@ 319-326 (lines=8) @@
316
            }
317
318
            // @@ NEED TO HANDLE "NESTED" TRANSACTION HERE
319
            if ($notnull != $oldnotnull) {
320
                $status = $this->setColumnNull($table, $column, !$notnull);
321
                if ($status != 0) {
322
                    $this->rollbackTransaction();
323
324
                    return -2;
325
                }
326
            }
327
328
            // Set default, if it has changed
329
            if ($default != $olddefault) {
@@ 344-351 (lines=8) @@
341
            }
342
343
            // Rename the column, if it has been changed
344
            if ($column != $name) {
345
                $status = $this->renameColumn($table, $column, $name);
346
                if ($status != 0) {
347
                    $this->rollbackTransaction();
348
349
                    return -4;
350
                }
351
            }
352
353
            // The $name and $table parameters must be cleaned for the setComment function.
354
            // It's ok to do that here since this is the last time these variables are used.