mirror of
https://github.com/silverstripe/silverstripe-postgresql
synced 2024-10-22 15:05:45 +00:00
BUGFIX: Make indexList() return double-quotes in index names to prevent unnecessary recreation of the indexes.
This commit is contained in:
parent
f74e9c260e
commit
8cd458b818
@ -439,6 +439,7 @@ class PostgreSQLDatabase extends SS_Database {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if($indexes) foreach($indexes as $k => $v) $indexSchemas .= $this->getIndexSqlDefinition($tableName, $k, $v) . "\n";
|
if($indexes) foreach($indexes as $k => $v) $indexSchemas .= $this->getIndexSqlDefinition($tableName, $k, $v) . "\n";
|
||||||
|
|
||||||
//Do we need to create a tablespace for this item?
|
//Do we need to create a tablespace for this item?
|
||||||
@ -1094,7 +1095,7 @@ class PostgreSQLDatabase extends SS_Database {
|
|||||||
$key=substr($value[1], 0, strpos($value[1], ')'));
|
$key=substr($value[1], 0, strpos($value[1], ')'));
|
||||||
$key=trim(trim(str_replace("\"", '', $key), '()'));
|
$key=trim(trim(str_replace("\"", '', $key), '()'));
|
||||||
$indexList[$key]['indexname']=$index['indexname'];
|
$indexList[$key]['indexname']=$index['indexname'];
|
||||||
$indexList[$key]['spec']=$prefix . '(' . $key . ')';
|
$indexList[$key]['spec']=$prefix . '("' . preg_replace('/ *, */','","',$key) . '")';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user