This commit is contained in:
Tim-Hinnerk Heuer 2017-07-27 03:52:03 +00:00 committed by GitHub
commit b857329330
1 changed files with 2 additions and 1 deletions

View File

@ -1125,7 +1125,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) {