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 <noreply@anthropic.com>
This commit is contained in:
Jake Barnby 2026-01-24 05:24:26 +13:00
parent c42fbc49f5
commit 760f065711

View file

@ -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,