From 0ea83790651e33784aa083ffb5134bb2c782e54c Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Thu, 9 Apr 2026 14:11:21 +0530 Subject: [PATCH] added the changes --- .../Http/TablesDB/Tables/Columns/BigInt/Create.php | 3 +-- .../Http/TablesDB/Tables/Columns/BigInt/Update.php | 3 +-- src/Appwrite/SDK/Specification/Format/Swagger2.php | 9 --------- 3 files changed, 2 insertions(+), 13 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/BigInt/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/BigInt/Create.php index 2b5dd078b4..1b7b33291b 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/BigInt/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/BigInt/Create.php @@ -8,7 +8,6 @@ use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; -use Utopia\Database\Validator\BigInt; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; use Utopia\Http\Adapter\Swoole\Response as SwooleResponse; @@ -59,7 +58,7 @@ class Create extends BigIntCreate ->param('required', null, new Boolean(), 'Is column required?') ->param('min', null, new Nullable(new Integer(false, 64)), 'Minimum value', true) ->param('max', null, new Nullable(new Integer(false, 64)), 'Maximum value', true) - ->param('default', null, new Nullable(new BigInt(false, true)), 'Default value. Cannot be set when column is required.', true) + ->param('default', null, new Nullable(new Integer(false, 64)), 'Default value. Cannot be set when column is required.', true) ->param('array', false, new Boolean(), 'Is column an array?', true) ->inject('response') ->inject('dbForProject') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/BigInt/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/BigInt/Update.php index bcec75f713..387dd08238 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/BigInt/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/BigInt/Update.php @@ -9,7 +9,6 @@ use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; -use Utopia\Database\Validator\BigInt; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; use Utopia\Http\Adapter\Swoole\Response as SwooleResponse; @@ -61,7 +60,7 @@ class Update extends BigIntUpdate ->param('required', null, new Boolean(), 'Is column required?') ->param('min', null, new Nullable(new Integer(false, 64)), 'Minimum value', true) ->param('max', null, new Nullable(new Integer(false, 64)), 'Maximum value', true) - ->param('default', null, new Nullable(new BigInt(false, true)), 'Default value. Cannot be set when column is required.') + ->param('default', null, new Nullable(new Integer(false, 64)), 'Default value. Cannot be set when column is required.') ->param('newKey', null, fn (Database $dbForProject) => new Nullable(new Key(false, $dbForProject->getAdapter()->getMaxUIDLength())), 'New Column Key.', true, ['dbForProject']) ->inject('response') ->inject('dbForProject') diff --git a/src/Appwrite/SDK/Specification/Format/Swagger2.php b/src/Appwrite/SDK/Specification/Format/Swagger2.php index f47ca03152..14a18eea2e 100644 --- a/src/Appwrite/SDK/Specification/Format/Swagger2.php +++ b/src/Appwrite/SDK/Specification/Format/Swagger2.php @@ -435,15 +435,6 @@ class Swagger2 extends Format $node['type'] = $validator->getType(); $node['x-example'] = ($param['example'] ?? '') ?: '<' . \strtoupper(Template::fromCamelCaseToSnake($node['name'])) . '>'; break; - case \Utopia\Database\Validator\BigInt::class: - // BigInt validator reports Database::VAR_BIGINT, but Swagger expects scalar types. - // We expose it as int64 to keep schema consistent with Column/Attribute models. - $node['type'] = 'integer'; - $node['format'] = 'int64'; - if (!empty($param['example'])) { - $node['x-example'] = $param['example']; - } - break; case \Utopia\Validator\Boolean::class: $node['type'] = $validator->getType(); $node['x-example'] = ($param['example'] ?? '') ?: false;