Code Duplication    Length = 6-9 lines in 2 locations

code/PostgreSQLSchemaManager.php 2 locations

@@ 231-239 (lines=9) @@
228
        }
229
230
        //Do we need to create a tablespace for this item?
231
        if ($advancedOptions && isset($advancedOptions['tablespace'])) {
232
            $this->createOrReplaceTablespace(
233
                $advancedOptions['tablespace']['name'],
234
                $advancedOptions['tablespace']['location']
235
            );
236
            $tableSpace = ' TABLESPACE ' . $advancedOptions['tablespace']['name'];
237
        } else {
238
            $tableSpace = '';
239
        }
240
241
        $this->query(
242
            "CREATE TABLE \"$table\" (
@@ 1360-1365 (lines=6) @@
1357
        $first = true;
1358
1359
        //Do we need to create a tablespace for this item?
1360
        if ($extensions && isset($extensions['tablespace'])) {
1361
            $this->createOrReplaceTablespace($extensions['tablespace']['name'], $extensions['tablespace']['location']);
1362
            $tableSpace = ' TABLESPACE ' . $extensions['tablespace']['name'];
1363
        } else {
1364
            $tableSpace = '';
1365
        }
1366
1367
        foreach ($partitions as $partition_name => $partition_value) {
1368
            //Check that this child table does not already exist: