From 760f065711e6c90f7075eb32be1e9332c56fa08e Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Sat, 24 Jan 2026 05:24:26 +1300 Subject: [PATCH] fix: reduce longtext size to fit within INT column limit The size field in the attributes collection is stored as a signed 32-bit integer (VAR_INTEGER). The longtext size of 4294967295 (2^32-1) exceeds the maximum value of 2147483647 (2^31-1), causing attribute creation to fail with a 400 error (document_invalid_structure). Changed the longtext size to 2147483647 which is the maximum value that fits within the signed 32-bit integer constraint of the schema. Co-Authored-By: Claude Opus 4.5 --- .../Http/Databases/Collections/Attributes/Longtext/Create.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Longtext/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Longtext/Create.php index 5d1ef307b2..d43014f001 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Longtext/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Longtext/Create.php @@ -89,7 +89,7 @@ class Create extends Action new Document([ 'key' => $key, 'type' => Database::VAR_LONGTEXT, - 'size' => 4294967295, + 'size' => 2147483647, 'required' => $required, 'default' => $default, 'array' => $array,