From 768d005f082c7b82e2318ef04fc79223180daeca Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Fri, 16 May 2025 20:30:04 +1200 Subject: [PATCH] Use create bulk attributes --- src/Appwrite/Migration/Version/V23.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/Appwrite/Migration/Version/V23.php b/src/Appwrite/Migration/Version/V23.php index b02ca20d1e..daa5b03660 100644 --- a/src/Appwrite/Migration/Version/V23.php +++ b/src/Appwrite/Migration/Version/V23.php @@ -234,12 +234,10 @@ class V23 extends Migration 'buildLogs', 'totalSize', ]; - foreach ($attributes as $attribute) { - try { - $this->createAttributeFromCollection($this->dbForProject, $id, $attribute); - } catch (\Throwable $th) { - Console::warning('Failed to create attributes "' . \implode(', ', $attributes) . "\" in collection {$id}: {$th->getMessage()}"); - } + try { + $this->createAttributesFromCollection($this->dbForProject, $id, $attributes); + } catch (\Throwable $th) { + Console::warning('Failed to create attributes "' . \implode(', ', $attributes) . "\" in collection {$id}: {$th->getMessage()}"); } $indexes = [