You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2025_07_21_0935-1a83934ad6d1_update_models.py 1.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. """update models
  2. Revision ID: 1a83934ad6d1
  3. Revises: 71f5020c6470
  4. Create Date: 2025-07-21 09:35:48.774794
  5. """
  6. from alembic import op
  7. import models as models
  8. import sqlalchemy as sa
  9. # revision identifiers, used by Alembic.
  10. revision = '1a83934ad6d1'
  11. down_revision = '71f5020c6470'
  12. branch_labels = None
  13. depends_on = None
  14. def upgrade():
  15. # ### commands auto generated by Alembic - please adjust! ###
  16. with op.batch_alter_table('tool_mcp_providers', schema=None) as batch_op:
  17. batch_op.alter_column('server_identifier',
  18. existing_type=sa.VARCHAR(length=24),
  19. type_=sa.String(length=64),
  20. existing_nullable=False)
  21. with op.batch_alter_table('tool_model_invokes', schema=None) as batch_op:
  22. batch_op.alter_column('tool_name',
  23. existing_type=sa.VARCHAR(length=40),
  24. type_=sa.String(length=128),
  25. existing_nullable=False)
  26. # ### end Alembic commands ###
  27. def downgrade():
  28. # ### commands auto generated by Alembic - please adjust! ###
  29. with op.batch_alter_table('tool_model_invokes', schema=None) as batch_op:
  30. batch_op.alter_column('tool_name',
  31. existing_type=sa.String(length=128),
  32. type_=sa.VARCHAR(length=40),
  33. existing_nullable=False)
  34. with op.batch_alter_table('tool_mcp_providers', schema=None) as batch_op:
  35. batch_op.alter_column('server_identifier',
  36. existing_type=sa.String(length=64),
  37. type_=sa.VARCHAR(length=24),
  38. existing_nullable=False)
  39. # ### end Alembic commands ###