Code Duplication    Length = 9-9 lines in 2 locations

src/database/Postgres.php 2 locations

@@ 1195-1203 (lines=9) @@
1192
1193
        $schema_rs = $this->getSchemaByName($schemaname);
1194
        /* Only if the owner change */
1195
        if ($schema_rs->fields['ownername'] != $owner) {
1196
            $sql    = "ALTER SCHEMA \"{$schemaname}\" OWNER TO \"{$owner}\"";
1197
            $status = $this->execute($sql);
1198
            if ($status != 0) {
1199
                $this->rollbackTransaction();
1200
1201
                return -1;
1202
            }
1203
        }
1204
1205
        // Only if the name has changed
1206
        if ($name != $schemaname) {
@@ 1206-1214 (lines=9) @@
1203
        }
1204
1205
        // Only if the name has changed
1206
        if ($name != $schemaname) {
1207
            $sql    = "ALTER SCHEMA \"{$schemaname}\" RENAME TO \"{$name}\"";
1208
            $status = $this->execute($sql);
1209
            if ($status != 0) {
1210
                $this->rollbackTransaction();
1211
1212
                return -1;
1213
            }
1214
        }
1215
1216
        return $this->endTransaction();
1217
    }