1
0
Fork 0
mirror of synced 2024-10-03 10:46:27 +13:00

Separates for 2 queries

This commit is contained in:
fogelito 2023-06-07 09:46:24 +03:00
parent 105d0a5212
commit 2a9b76b205

View file

@ -148,10 +148,13 @@ class V19 extends Migration
$collectionName = "`{$this->projectDB->getDefaultDatabase()}`.`'_{$this->project->getInternalId()}_{$collectionName}_perms`";
try {
$this->pdo->prepare("ALTER TABLE {$collectionName}
DROP INDEX `_permission` ,
ADD INDEX `_permission` (`_permission`, `_type`, `_document`);
")->execute();
$this->pdo->prepare("ALTER TABLE {$collectionName} DROP INDEX `_permission`")->execute();
} catch (\Throwable $th) {
Console::warning($th->getMessage());
}
try {
$this->pdo->prepare("ALTER TABLE {$collectionName} ADD INDEX `_permission` (`_permission`, `_type`, `_document`)")->execute();
} catch (\Throwable $th) {
Console::warning($th->getMessage());
}