From 0097a0edcd996896e34c4c83a1539601401e1614 Mon Sep 17 00:00:00 2001 From: fogelito Date: Thu, 29 May 2025 15:37:08 +0300 Subject: [PATCH] Update migration self-hosted --- src/Appwrite/Migration/Version/V22.php | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/Appwrite/Migration/Version/V22.php b/src/Appwrite/Migration/Version/V22.php index a3197ec3d9..fd80af565b 100644 --- a/src/Appwrite/Migration/Version/V22.php +++ b/src/Appwrite/Migration/Version/V22.php @@ -145,17 +145,16 @@ class V22 extends Migration $this->dbForProject->purgeCachedCollection($id); break; case 'memberships': - // $indexes = [ - // '_key_roles', - // ]; - // foreach ($indexes as $index) { - // try { - // $this->createIndexFromCollection($this->dbForProject, $id, $index); - // } catch (Throwable $th) { - // Console::warning("Failed to create index \"$index\" from {$id}: {$th->getMessage()}"); - // } - // } - // $this->dbForProject->purgeCachedCollection($id); + $indexes = [ + '_key_roles', + ]; + foreach ($indexes as $index) { + try { + $this->dbForProject->deleteIndex($id, $index); + } catch (Throwable $th) { + Console::warning("Failed to delete index \"$index\" from {$id}: {$th->getMessage()}"); + } + } break; case 'migrations': $attributes = [