mirror of
https://github.com/langgenius/dify.git
synced 2026-04-05 20:09:20 +08:00
Increased the character limitation (#22679)
Co-authored-by: crazywoola <427733928@qq.com>
This commit is contained in:
@@ -0,0 +1,51 @@
|
|||||||
|
"""update models
|
||||||
|
|
||||||
|
Revision ID: 1a83934ad6d1
|
||||||
|
Revises: 71f5020c6470
|
||||||
|
Create Date: 2025-07-21 09:35:48.774794
|
||||||
|
|
||||||
|
"""
|
||||||
|
from alembic import op
|
||||||
|
import models as models
|
||||||
|
import sqlalchemy as sa
|
||||||
|
|
||||||
|
|
||||||
|
# revision identifiers, used by Alembic.
|
||||||
|
revision = '1a83934ad6d1'
|
||||||
|
down_revision = '71f5020c6470'
|
||||||
|
branch_labels = None
|
||||||
|
depends_on = None
|
||||||
|
|
||||||
|
|
||||||
|
def upgrade():
|
||||||
|
# ### commands auto generated by Alembic - please adjust! ###
|
||||||
|
with op.batch_alter_table('tool_mcp_providers', schema=None) as batch_op:
|
||||||
|
batch_op.alter_column('server_identifier',
|
||||||
|
existing_type=sa.VARCHAR(length=24),
|
||||||
|
type_=sa.String(length=64),
|
||||||
|
existing_nullable=False)
|
||||||
|
|
||||||
|
with op.batch_alter_table('tool_model_invokes', schema=None) as batch_op:
|
||||||
|
batch_op.alter_column('tool_name',
|
||||||
|
existing_type=sa.VARCHAR(length=40),
|
||||||
|
type_=sa.String(length=128),
|
||||||
|
existing_nullable=False)
|
||||||
|
|
||||||
|
# ### end Alembic commands ###
|
||||||
|
|
||||||
|
|
||||||
|
def downgrade():
|
||||||
|
# ### commands auto generated by Alembic - please adjust! ###
|
||||||
|
with op.batch_alter_table('tool_model_invokes', schema=None) as batch_op:
|
||||||
|
batch_op.alter_column('tool_name',
|
||||||
|
existing_type=sa.String(length=128),
|
||||||
|
type_=sa.VARCHAR(length=40),
|
||||||
|
existing_nullable=False)
|
||||||
|
|
||||||
|
with op.batch_alter_table('tool_mcp_providers', schema=None) as batch_op:
|
||||||
|
batch_op.alter_column('server_identifier',
|
||||||
|
existing_type=sa.String(length=64),
|
||||||
|
type_=sa.VARCHAR(length=24),
|
||||||
|
existing_nullable=False)
|
||||||
|
|
||||||
|
# ### end Alembic commands ###
|
||||||
@@ -254,7 +254,7 @@ class MCPToolProvider(Base):
|
|||||||
# name of the mcp provider
|
# name of the mcp provider
|
||||||
name: Mapped[str] = mapped_column(db.String(40), nullable=False)
|
name: Mapped[str] = mapped_column(db.String(40), nullable=False)
|
||||||
# server identifier of the mcp provider
|
# server identifier of the mcp provider
|
||||||
server_identifier: Mapped[str] = mapped_column(db.String(24), nullable=False)
|
server_identifier: Mapped[str] = mapped_column(db.String(64), nullable=False)
|
||||||
# encrypted url of the mcp provider
|
# encrypted url of the mcp provider
|
||||||
server_url: Mapped[str] = mapped_column(db.Text, nullable=False)
|
server_url: Mapped[str] = mapped_column(db.Text, nullable=False)
|
||||||
# hash of server_url for uniqueness check
|
# hash of server_url for uniqueness check
|
||||||
@@ -358,7 +358,7 @@ class ToolModelInvoke(Base):
|
|||||||
# type
|
# type
|
||||||
tool_type = db.Column(db.String(40), nullable=False)
|
tool_type = db.Column(db.String(40), nullable=False)
|
||||||
# tool name
|
# tool name
|
||||||
tool_name = db.Column(db.String(40), nullable=False)
|
tool_name = db.Column(db.String(128), nullable=False)
|
||||||
# invoke parameters
|
# invoke parameters
|
||||||
model_parameters = db.Column(db.Text, nullable=False)
|
model_parameters = db.Column(db.Text, nullable=False)
|
||||||
# prompt messages
|
# prompt messages
|
||||||
|
|||||||
Reference in New Issue
Block a user