From 320171822c07da00fa7baa557c6c06254881ffee Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Wed, 6 Aug 2025 10:56:42 +0530 Subject: [PATCH] replaced create attribute with a util createAttributeFromCollection method --- src/Appwrite/Migration/Version/V23.php | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/Appwrite/Migration/Version/V23.php b/src/Appwrite/Migration/Version/V23.php index 7d24756c14..88f6d0451b 100644 --- a/src/Appwrite/Migration/Version/V23.php +++ b/src/Appwrite/Migration/Version/V23.php @@ -2,7 +2,6 @@ namespace Appwrite\Migration\Version; -use Appwrite\ID; use Appwrite\Migration\Migration; use Exception; use Throwable; @@ -46,15 +45,7 @@ class V23 extends Migration // since required + default can't be used together // so first creating the attribute then bulk updating the attribute - $this->dbForProject->createAttributes('databases', [new Document([ - '$id' => ID::custom('type'), - 'type' => Database::VAR_STRING, - 'size' => 128, - 'required' => true, - 'signed' => true, - 'array' => false, - 'filters' => [], - ])]); + $this->createAttributeFromCollection($this->dbForProject, 'databases', 'type'); $this->dbForProject->updateDocuments('databases', new Document(['type' => 'sql'])); }