Merge pull request #9924 from appwrite/remove-index-roles

Remove roles index
This commit is contained in:
Jake Barnby 2025-05-29 13:02:31 +00:00 committed by GitHub
commit c770147755
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 9 deletions

View file

@ -1439,13 +1439,6 @@ return [
'lengths' => [],
'orders' => [Database::ORDER_ASC],
],
[
'$id' => ID::custom('_key_roles'),
'type' => Database::INDEX_KEY,
'attributes' => ['roles'],
'lengths' => [128],
'orders' => [],
],
],
],

View file

@ -150,9 +150,9 @@ class V22 extends Migration
];
foreach ($indexes as $index) {
try {
$this->createIndexFromCollection($this->dbForProject, $id, $index);
$this->dbForProject->deleteIndex($id, $index);
} catch (Throwable $th) {
Console::warning("Failed to create index \"$index\" from {$id}: {$th->getMessage()}");
Console::warning("Failed to delete index \"$index\" from {$id}: {$th->getMessage()}");
}
}
$this->dbForProject->purgeCachedCollection($id);