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())