mirror of
https://github.com/silverstripe/silverstripe-postgresql
synced 2024-10-22 17:05:45 +02:00
Fixes #73 Delete indexes if the exist before creating them.
This commit is contained in:
parent
bddbdde5de
commit
e536a8b85a
@ -1124,7 +1124,8 @@ class PostgreSQLDatabase extends SS_Database {
|
||||
default:
|
||||
$spec = "create index \"$tableCol\" ON \"$tableName\" (" . $indexSpec['value'] . ") $fillfactor $where";
|
||||
}
|
||||
return trim($spec) . ';';
|
||||
$deleteStatement = "drop index if exists \"$tableCol\";";
|
||||
return $deleteStatement . ' '. trim($spec) . ';';
|
||||
}
|
||||
|
||||
function getDbSqlDefinition($tableName, $indexName, $indexSpec) {
|
||||
|
Loading…
Reference in New Issue
Block a user