From 24fcf4247c06c6ae2c576f26b3d8b353940c6638 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Thu, 2 Apr 2026 09:41:20 +0530 Subject: [PATCH] Fix flaky vectordb migration test --- .../Modules/Databases/Http/VectorsDB/Collections/Create.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/VectorsDB/Collections/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/VectorsDB/Collections/Create.php index b85a8b30b4..a7e2d68eac 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/VectorsDB/Collections/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/VectorsDB/Collections/Create.php @@ -130,9 +130,11 @@ class Create extends CollectionAction $indexes[] = new Document($index); } try { - // passing null in creates only creates the metadata collection if (!$dbForDatabases->exists(null, Database::METADATA)) { - $dbForDatabases->create(); + try { + $dbForDatabases->create(); + } catch (DuplicateException) { + } } $dbForDatabases->createCollection( id: 'database_' . $database->getSequence() . '_collection_' . $collection->getSequence(),