Skip to content

Big int#1412

Open
ArnabChatterjee20k wants to merge 4 commits intomasterfrom
big-int
Open

Big int#1412
ArnabChatterjee20k wants to merge 4 commits intomasterfrom
big-int

Conversation

@ArnabChatterjee20k
Copy link
Copy Markdown
Member

What does this PR do?

(Provide a description of what this PR does.)

Test Plan

(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work.)

Related PRs and Issues

(If this PR is related to any other PR or resolves any issue or related to any issue link all related PR and issues here.)

Have you read the Contributing Guidelines on issues?

(Write your answer here.)

- Updated AttributeSchema and ColumnSchema to include "bigint".
- Implemented creation and update methods for bigint attributes in the Attributes class.
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 1, 2026

Greptile Summary

This PR adds bigint as a supported attribute/column type to the Appwrite CLI SDK generator, enabling creation and updates of 64-bit integer attributes in both collections and tables.

  • config.ts: \"bigint\" is added to the type enum in AttributeSchema and ColumnSchema, reusing the existing int64Schema for min/max validation.
  • attributes.ts: case \"bigint\" branches are added to createAttribute and updateAttribute, calling createBigIntAttribute/updateBigIntAttribute on the databases service, consistent with the existing integer pattern.
  • typescript-type-utils.ts (not modified): getTypeScriptType has no \"bigint\" case and throws Error: Unknown attribute type: bigint at runtime, breaking TypeScript type generation for any schema containing a bigint field.

Confidence Score: 4/5

Safe for attribute CRUD operations but breaks TypeScript type generation for any schema that includes a bigint column.

The CRUD path in attributes.ts correctly mirrors the integer pattern and will work at runtime. However, typescript-type-utils.ts was not updated — its getTypeScriptType switch exhausts all known types with a throw on default, so generating TypeScript types for a collection or table with a bigint field will crash.

templates/cli/lib/shared/typescript-type-utils.ts — needs a case "bigint" added to getTypeScriptType.

Important Files Changed

Filename Overview
templates/cli/lib/commands/utils/attributes.ts Adds bigint cases to createAttribute and updateAttribute, mirroring the existing integer pattern correctly.
templates/cli/lib/commands/config.ts Adds "bigint" to the type enum in both AttributeSchema and ColumnSchema; consistent with existing schema structure.
templates/cli/lib/shared/typescript-type-utils.ts Not modified by this PR but directly impacted — getTypeScriptType throws on "bigint" attributes because no case was added.

Comments Outside Diff (1)

  1. templates/cli/lib/shared/typescript-type-utils.ts, line 52-55 (link)

    Missing bigint case in TypeScript type generation

    getTypeScriptType does not handle "bigint" and falls through to the default branch, which throws Error: Unknown attribute type: bigint. Any attempt to generate TypeScript types for a collection or table that contains a bigint attribute will crash at runtime. The "bigint" case needs to be added here alongside the other numeric types — map it to either "bigint" or "number" depending on the desired generated-type contract.

Reviews (3): Last reviewed commit: "Merge remote-tracking branch 'origin/mas..." | Re-trigger Greptile

Comment thread templates/cli/lib/commands/utils/attributes.ts
@ArnabChatterjee20k
Copy link
Copy Markdown
Member Author

@copilot sync with master branch

Co-authored-by: ArnabChatterjee20k <83803257+ArnabChatterjee20k@users.noreply.github.com>
Copy link
Copy Markdown

Copilot AI commented May 7, 2026

@copilot sync with master branch

Synced this branch with the latest master in commit 03daa33.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/Jean85/pretty-package-versions/zipball/4d7aa5dab42e2a76d99559706022885de0e18e1a
    • Triggering command: REDACTED, pid is -1 (http block)
    • Triggering command: /usr/local/bin/php php /usr/bin/composer install --ignore-platform-reqs --optimize-autoloader --no-plugins --no-scripts --prefer-dist s.git gmann-diff.git/ iff sh fill�� exec &#39;git&#39; &#39;rese--dissociate che/composer/vcs--reference etc/ssl/certs/ca-certificates.crt&#34;, &#34;REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certifi est.git git-upload-pack bake che/composer/vcs--file sh (http block)
  • https://api.github.com/repos/Nevay/spi/zipball/e7078767866d0a9e0f91d3f9d42a832df5e39002
    • Triggering command: /usr/local/bin/php php /usr/bin/composer install --ignore-platform-reqs --optimize-autoloader --no-plugins --no-scripts --prefer-dist s.git gmann-diff.git/ iff sh fill�� exec &#39;git&#39; &#39;rese--dissociate che/composer/vcs--reference etc/ssl/certs/ca-certificates.crt&#34;, &#34;REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certifi est.git git-upload-pack bake che/composer/vcs--file sh (http block)
  • https://api.github.com/repos/Nyholm/psr7-server/zipball/4335801d851f554ca43fa6e7d2602141538854dc
    • Triggering command: /usr/local/bin/php php /usr/bin/composer install --ignore-platform-reqs --optimize-autoloader --no-plugins --no-scripts --prefer-dist s.git gmann-diff.git/ iff sh fill�� exec &#39;git&#39; &#39;rese--dissociate che/composer/vcs--reference etc/ssl/certs/ca-certificates.crt&#34;, &#34;REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certifi est.git git-upload-pack bake che/composer/vcs--file sh (http block)
  • https://api.github.com/repos/Nyholm/psr7/zipball/a71f2b11690f4b24d099d6b16690a90ae14fc6f3
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/0ca86845ce43291e8f5692c7356fccf3bcf02bf4
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/brick/math/zipball/f05858549e5f9d7bb45875a75583240a38a281d0
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/composer/semver/zipball/198166618906cb2de69b95d7d47e5fa8aa1b2b95
    • Triggering command: /usr/local/bin/php php /usr/bin/composer install --ignore-platform-reqs --optimize-autoloader --no-plugins --no-scripts --prefer-dist s.git gmann-diff.git/ iff sh fill�� exec &#39;git&#39; &#39;rese--dissociate che/composer/vcs--reference etc/ssl/certs/ca-certificates.crt&#34;, &#34;REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certifi est.git git-upload-pack bake che/composer/vcs--file sh (http block)
  • https://api.github.com/repos/matthiasmullie/minify/zipball/76ba4a5f555fd7bf4aa408af608e991569076671
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/matthiasmullie/path-converter/zipball/e7d13b2c7e2f2268e1424aaed02085518afa02d9
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/mongodb/mongo-php-library/zipball/b0bbd657f84219212487d01a8ffe93a789e1e488
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/myclabs/DeepCopy/zipball/07d290f0c47959fd5eed98c95ee5602db07e0b6a
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/nikic/PHP-Parser/zipball/dca41cd15c2ac9d055ad70dbfd011130757d1f82
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/opentelemetry-php/api/zipball/45bda7efa8fcdd9bdb0daa2f26c8e31f062f49d4
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/opentelemetry-php/context/zipball/d4c4470b541ce72000d18c339cfee633e4c8e0cf
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/opentelemetry-php/exporter-otlp/zipball/07b02bc71838463f6edcc78d3485c04b48fb263d
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/opentelemetry-php/gen-otlp-protobuf/zipball/673af5b06545b513466081884b47ef15a536edde
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/opentelemetry-php/sdk/zipball/3dfc3d1ad729ec7eb25f1b9a4ae39fe779affa99
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/opentelemetry-php/sem-conv/zipball/8da7ec497c881e39afa6657d72586e27efbd29a1
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/paratestphp/paratest/zipball/130a9bf0e269ee5f5b320108f794ad03e275cad4
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/phar-io/manifest/zipball/54750ef60c58e43759730615a392c31c80e23176
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/QSgzVS /usr/bin/composer install --ignore-platform-reqs --no-interaction --no-progress (http block)
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/php-fig/http-client/zipball/bb5906edc1c324c9a05aa0873d40117941e5fa90
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/php-fig/http-factory/zipball/2b4765fddfe3b508ac62f829e852b1501d3f6e8a
    • Triggering command: /usr/local/bin/php php /usr/bin/composer install --ignore-platform-reqs --optimize-autoloader --no-plugins --no-scripts --prefer-dist s.git gmann-diff.git/ iff sh fill�� exec &#39;git&#39; &#39;rese--dissociate che/composer/vcs--reference etc/ssl/certs/ca-certificates.crt&#34;, &#34;REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certifi est.git git-upload-pack bake che/composer/vcs--file sh (http block)
  • https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71
    • Triggering command: /usr/local/bin/php php /usr/bin/composer install --ignore-platform-reqs --optimize-autoloader --no-plugins --no-scripts --prefer-dist s.git gmann-diff.git/ iff sh fill�� exec &#39;git&#39; &#39;rese--dissociate che/composer/vcs--reference etc/ssl/certs/ca-certificates.crt&#34;, &#34;REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certifi est.git git-upload-pack bake che/composer/vcs--file sh (http block)
  • https://api.github.com/repos/php-fig/log/zipball/f16e1d5863e37f8d8c2a01719f5b34baa2b714d3
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/php-http/discovery/zipball/82fe4c73ef3363caed49ff8dd1539ba06044910d
    • Triggering command: /usr/local/bin/php php /usr/bin/composer install --ignore-platform-reqs --optimize-autoloader --no-plugins --no-scripts --prefer-dist s.git gmann-diff.git/ iff sh fill�� exec &#39;git&#39; &#39;rese--dissociate che/composer/vcs--reference etc/ssl/certs/ca-certificates.crt&#34;, &#34;REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certifi est.git git-upload-pack bake che/composer/vcs--file sh (http block)
  • https://api.github.com/repos/protocolbuffers/protobuf-php/zipball/fbd96b7bf1343f4b0d8fb358526c7ba4d72f1318
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/ramsey/collection/zipball/344572933ad0181accbf4ba763e85a0306a8c5e2
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/ramsey/uuid/zipball/81f941f6f729b1e3ceea61d9d014f8b6c6800440
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/15c5dd40dc4f38794d383bb95465193f5e0ae180
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/183a9b2632194febd219bb9246eee421dad8d45e
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/sebastianbergmann/code-unit/zipball/54391c61e4af8078e5b276ab082b6d3c54c9ad64
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/sebastianbergmann/comparator/zipball/2c95e1e86cb8dd41beb8d502057d1081ccc8eca9
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/sebastianbergmann/complexity/zipball/ee41d384ab1906c68852636b6de493846e13e5a0
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/sebastianbergmann/diff/zipball/b4ccd857127db5d41a5b676f24b51371d76d8544
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/sebastianbergmann/environment/zipball/a5c75038693ad2e8d4b6c15ba2403532647830c4
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/sebastianbergmann/exporter/zipball/70a298763b40b213ec087c51c739efcaa90bcd74
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/sebastianbergmann/global-state/zipball/3be331570a721f9a4b5917f4209773de17f747d7
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/d36ad0d782e5756913e42ad87cb2890f4ffe467a
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/f5b498e631a74204185071eb41f33f38d64608aa
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/6e1a43b411b2ad34146dee7524cb13a068bb35f9
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/2c1ed04922802c15e1de5d7447b4856de949cf56
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/118cfaaa8bc5aef3287bf315b6060b1174754af6
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/c1ca3814734c07492b3d4c5f794f4b0995333da2
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/3e0404dc6b300e6bf56415467ebcb3fe4f33e964
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3b415def83fbcb41f991d9ebf16ae4ad8b7837b3
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/sebastianbergmann/phpunit/zipball/fdfc727f0fcacfeb8fcb30c7e5da173125b58be3
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/f6458abbf32a6c8174f8f26261475dc133b3d9dc
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/sebastianbergmann/type/zipball/f77d2d4e78738c98d9a68d2596fe5e8fa380f449
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/sebastianbergmann/version/zipball/c687e3387b99f5b03b6caa64c74b63e2936ff874
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/staabm/side-effects-detector/zipball/d8334211a140ce329c13726d4a715adbddd0a163
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/swoole/ide-helper/zipball/33ec7af9111b76d06a70dd31191cc74793551112
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/symfony/console/zipball/c28ad91448f86c5f6d9d2c70f0cf68bf135f252a
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/symfony/deprecation-contracts/zipball/63afe740e99a13ba87ec199bb07bbdee937a5b62
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/QSgzVS /usr/bin/composer install --ignore-platform-reqs --no-interaction --no-progress (http block)
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/symfony/http-client-contracts/zipball/75d7043853a42837e68111812f4d964b01e5101c
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/symfony/http-client/zipball/26cc224ea7103dda90e9694d9e139a389092d007
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/symfony/polyfill-ctype/zipball/a3cc8b044a6ea513310cbd48ef7333b384945638
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/QSgzVS /usr/bin/composer install --ignore-platform-reqs --no-interaction --no-progress (http block)
  • https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/380872130d3a5dd3ace2f4010d95125fde5d5c70
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/QSgzVS /usr/bin/composer install --ignore-platform-reqs --no-interaction --no-progress (http block)
  • https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/3833d7255cc303546435cb650316bff708a1c75c
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/QSgzVS /usr/bin/composer install --ignore-platform-reqs --no-interaction --no-progress (http block)
  • https://api.github.com/repos/symfony/polyfill-mbstring/zipball/6d857f4d76bd4b343eac26d6b539585d2bc56493
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/QSgzVS /usr/bin/composer install --ignore-platform-reqs --no-interaction --no-progress (http block)
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/symfony/polyfill-php80/zipball/0cc9dd0f17f61d8131e7df6b84bd344899fe2608
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/symfony/polyfill-php81/zipball/4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/symfony/polyfill-php82/zipball/5d2ed36f7734637dacc025f179698031951b1692
    • Triggering command: /usr/local/bin/php php /usr/bin/composer install --ignore-platform-reqs --optimize-autoloader --no-plugins --no-scripts --prefer-dist s.git gmann-diff.git/ iff sh fill�� exec &#39;git&#39; &#39;rese--dissociate che/composer/vcs--reference etc/ssl/certs/ca-certificates.crt&#34;, &#34;REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certifi est.git git-upload-pack bake che/composer/vcs--file sh (http block)
  • https://api.github.com/repos/symfony/polyfill-php83/zipball/17f6f9a6b1735c0f163024d959f700cfbc5155e5
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/symfony/process/zipball/608476f4604102976d687c483ac63a79ba18cc97
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/QSgzVS /usr/bin/composer install --ignore-platform-reqs --no-interaction --no-progress (http block)
  • https://api.github.com/repos/symfony/service-contracts/zipball/45112560a3ba2d715666a509a0bc9521d10b6c43
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/symfony/string/zipball/f96476035142921000338bad71e5247fbc138872
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/QSgzVS /usr/bin/composer install --ignore-platform-reqs --no-interaction --no-progress (http block)
  • https://api.github.com/repos/theofidry/cpu-core-counter/zipball/db9508f7b1474469d9d3c53b86f817e344732678
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/theseer/tokenizer/zipball/b7489ce515e168639d17feec34b8847c326b0b3c
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/twigphp/Twig/zipball/0b6f9d8370bb3b7f1ce5313ed8feb0fafd6e399a
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/utopia-php/cache/zipball/552b4c554bb14d0c529631ce304cdf4a2b9d06a6
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/utopia-php/cli/zipball/5b936638c90c86d1bae83d0dbe81fe14d12ff8ff
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/utopia-php/compression/zipball/66f093557ba66d98245e562036182016c7dcfe8a
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/utopia-php/database/zipball/02f20bd901b8fab26d7dc2c58f7da1d6a08d21c0
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/utopia-php/http/zipball/76def92594c32504ec80eaacdb60ff8fad73c856
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/utopia-php/mongo/zipball/52326a9a43e2d27ff0c15c48ba746dacbe9a7aee
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/utopia-php/swoole/zipball/150c30700e738c52348cce9ed0e0f0ff96872081
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/utopia-php/telemetry/zipball/437f0021777f0e575dfb9e8a1a081b3aed75e33f
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/utopia-php/validators/zipball/5c57d5b6cf964f8981807c1d3ea8df620c869080
    • Triggering command: REDACTED, pid is -1 (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants