mirror of
https://github.com/silverstripe/silverstripe-postgresql
synced 2024-06-22 12:39:30 +02: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";
|
||||
|
||||
//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=trim(trim(str_replace("\"", '', $key), '()'));
|
||||
$indexList[$key]['indexname']=$index['indexname'];
|
||||
$indexList[$key]['spec']=$prefix . '(' . $key . ')';
|
||||
$indexList[$key]['spec']=$prefix . '("' . preg_replace('/ *, */','","',$key) . '")';
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user