From 72265259eccfd5c638196f93d3cf78f7ffd8b099 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Wed, 1 Apr 2026 10:31:08 +0530 Subject: [PATCH] feat(cli): add support for bigint data type in attributes - Updated AttributeSchema and ColumnSchema to include "bigint". - Implemented creation and update methods for bigint attributes in the Attributes class. --- templates/cli/lib/commands/config.ts | 2 ++ .../cli/lib/commands/utils/attributes.ts | 21 +++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/templates/cli/lib/commands/config.ts b/templates/cli/lib/commands/config.ts index 351b7b1a9d..c56b791e49 100644 --- a/templates/cli/lib/commands/config.ts +++ b/templates/cli/lib/commands/config.ts @@ -199,6 +199,7 @@ const AttributeSchema = z "mediumtext", "longtext", "integer", + "bigint", "double", "boolean", "datetime", @@ -279,6 +280,7 @@ const ColumnSchema = z "mediumtext", "longtext", "integer", + "bigint", "double", "boolean", "datetime", diff --git a/templates/cli/lib/commands/utils/attributes.ts b/templates/cli/lib/commands/utils/attributes.ts index f33e773105..47ca2e078e 100644 --- a/templates/cli/lib/commands/utils/attributes.ts +++ b/templates/cli/lib/commands/utils/attributes.ts @@ -301,6 +301,17 @@ export class Attributes { xdefault: attribute.default, array: attribute.array, }); + case "bigint": + return databasesService.createBigIntAttribute({ + databaseId, + collectionId, + key: attribute.key, + required: attribute.required, + min: attribute.min, + max: attribute.max, + xdefault: attribute.default, + array: attribute.array, + }); case "double": return databasesService.createFloatAttribute({ databaseId, @@ -465,6 +476,16 @@ export class Attributes { max: attribute.max, xdefault: attribute.default, }); + case "bigint": + return databasesService.updateBigIntAttribute({ + databaseId, + collectionId, + key: attribute.key, + required: attribute.required, + min: attribute.min, + max: attribute.max, + xdefault: attribute.default, + }); case "double": return databasesService.updateFloatAttribute({ databaseId,