Code Duplication    Length = 9-9 lines in 2 locations

src/database/Postgres.php 2 locations

@@ 1216-1224 (lines=9) @@
1213
1214
        $schema_rs = $this->getSchemaByName($schemaname);
1215
        /* Only if the owner change */
1216
        if ($schema_rs->fields['ownername'] != $owner) {
1217
            $sql = "ALTER SCHEMA \"{$schemaname}\" OWNER TO \"{$owner}\"";
1218
            $status = $this->execute($sql);
1219
            if ($status != 0) {
1220
                $this->rollbackTransaction();
1221
1222
                return -1;
1223
            }
1224
        }
1225
1226
        // Only if the name has changed
1227
        if ($name != $schemaname) {
@@ 1227-1235 (lines=9) @@
1224
        }
1225
1226
        // Only if the name has changed
1227
        if ($name != $schemaname) {
1228
            $sql = "ALTER SCHEMA \"{$schemaname}\" RENAME TO \"{$name}\"";
1229
            $status = $this->execute($sql);
1230
            if ($status != 0) {
1231
                $this->rollbackTransaction();
1232
1233
                return -1;
1234
            }
1235
        }
1236
1237
        return $this->endTransaction();
1238
    }