|
| 1 | +"""extend provider column |
| 2 | +
|
| 3 | +Revision ID: 5511c782ee4c |
| 4 | +Revises: 4413929e1ec2 |
| 5 | +Create Date: 2025-03-07 03:15:05.364804 |
| 6 | +
|
| 7 | +""" |
| 8 | +from alembic import op |
| 9 | +import models as models |
| 10 | +import sqlalchemy as sa |
| 11 | + |
| 12 | + |
| 13 | +# revision identifiers, used by Alembic. |
| 14 | +revision = '5511c782ee4c' |
| 15 | +down_revision = '4413929e1ec2' |
| 16 | +branch_labels = None |
| 17 | +depends_on = None |
| 18 | + |
| 19 | + |
| 20 | +def upgrade(): |
| 21 | + # ### commands auto generated by Alembic - please adjust! ### |
| 22 | + with op.batch_alter_table('tool_api_providers', schema=None) as batch_op: |
| 23 | + batch_op.alter_column('name', |
| 24 | + existing_type=sa.VARCHAR(length=40), |
| 25 | + type_=sa.String(length=255), |
| 26 | + existing_nullable=False) |
| 27 | + |
| 28 | + with op.batch_alter_table('tool_model_invokes', schema=None) as batch_op: |
| 29 | + batch_op.alter_column('provider', |
| 30 | + existing_type=sa.VARCHAR(length=40), |
| 31 | + type_=sa.String(length=255), |
| 32 | + existing_nullable=False) |
| 33 | + |
| 34 | + with op.batch_alter_table('tool_workflow_providers', schema=None) as batch_op: |
| 35 | + batch_op.alter_column('name', |
| 36 | + existing_type=sa.VARCHAR(length=40), |
| 37 | + type_=sa.String(length=255), |
| 38 | + existing_nullable=False) |
| 39 | + |
| 40 | + # ### end Alembic commands ### |
| 41 | + |
| 42 | + |
| 43 | +def downgrade(): |
| 44 | + # ### commands auto generated by Alembic - please adjust! ### |
| 45 | + |
| 46 | + with op.batch_alter_table('tool_workflow_providers', schema=None) as batch_op: |
| 47 | + batch_op.alter_column('name', |
| 48 | + existing_type=sa.String(length=255), |
| 49 | + type_=sa.VARCHAR(length=40), |
| 50 | + existing_nullable=False) |
| 51 | + |
| 52 | + with op.batch_alter_table('tool_model_invokes', schema=None) as batch_op: |
| 53 | + batch_op.alter_column('provider', |
| 54 | + existing_type=sa.String(length=255), |
| 55 | + type_=sa.VARCHAR(length=40), |
| 56 | + existing_nullable=False) |
| 57 | + |
| 58 | + with op.batch_alter_table('tool_api_providers', schema=None) as batch_op: |
| 59 | + batch_op.alter_column('name', |
| 60 | + existing_type=sa.String(length=255), |
| 61 | + type_=sa.VARCHAR(length=40), |
| 62 | + existing_nullable=False) |
| 63 | + |
| 64 | + # ### end Alembic commands ### |
0 commit comments