From c3455c85619fb65c3b887ea460d1659b0c47b2f8 Mon Sep 17 00:00:00 2001 From: Kalo Chin Date: Wed, 9 Jul 2025 02:31:09 +0900 Subject: [PATCH] Increase node_id length in NodeFileUsage to 255 chars Updated the node_id column in both the migration and model definition from 64 to 255 characters to support longer node identifiers. --- .../2025_07_07_1152-b2a0bfccd123_add_node_file_usage.py | 2 +- api/models/model.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api/migrations/versions/2025_07_07_1152-b2a0bfccd123_add_node_file_usage.py b/api/migrations/versions/2025_07_07_1152-b2a0bfccd123_add_node_file_usage.py index 3c630928c4..816392216e 100644 --- a/api/migrations/versions/2025_07_07_1152-b2a0bfccd123_add_node_file_usage.py +++ b/api/migrations/versions/2025_07_07_1152-b2a0bfccd123_add_node_file_usage.py @@ -23,7 +23,7 @@ def upgrade() -> None: sa.Column("id", postgresql.UUID(as_uuid=True), primary_key=True, server_default=sa.text("uuid_generate_v4()")), sa.Column("conversation_id", postgresql.UUID(as_uuid=True), nullable=False, index=True), sa.Column("message_id", postgresql.UUID(as_uuid=True), nullable=True), - sa.Column("node_id", sa.String(length=64), nullable=False, index=True), + sa.Column("node_id", sa.String(length=255), nullable=False, index=True), sa.Column("upload_file_id", postgresql.UUID(as_uuid=True), nullable=False), sa.Column("created_at", sa.DateTime(), server_default=sa.func.now(), nullable=False), sa.ForeignKeyConstraint(["conversation_id"], ["conversations.id"],), diff --git a/api/models/model.py b/api/models/model.py index 9dbe6e8726..29eaa77583 100644 --- a/api/models/model.py +++ b/api/models/model.py @@ -1758,7 +1758,7 @@ class NodeFileUsage(Base): id = db.Column(StringUUID, server_default=db.text("uuid_generate_v4()")) conversation_id = db.Column(StringUUID, db.ForeignKey("conversations.id"), nullable=False) message_id = db.Column(StringUUID, db.ForeignKey("messages.id"), nullable=True) - node_id = db.Column(db.String(64), nullable=False) + node_id = db.Column(db.String(255), nullable=False) upload_file_id = db.Column(StringUUID, db.ForeignKey("upload_files.id"), nullable=False) created_at = db.Column(db.DateTime, nullable=False, server_default=func.current_timestamp())