187385f442fc_modify_provider_model_name_length.py 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. """modify provider model name length
  2. Revision ID: 187385f442fc
  3. Revises: 88072f0caa04
  4. Create Date: 2024-01-02 07:18:43.887428
  5. """
  6. import sqlalchemy as sa
  7. from alembic import op
  8. # revision identifiers, used by Alembic.
  9. revision = '187385f442fc'
  10. down_revision = '88072f0caa04'
  11. branch_labels = None
  12. depends_on = None
  13. def upgrade():
  14. # ### commands auto generated by Alembic - please adjust! ###
  15. with op.batch_alter_table('provider_models', schema=None) as batch_op:
  16. batch_op.alter_column('model_name',
  17. existing_type=sa.VARCHAR(length=40),
  18. type_=sa.String(length=255),
  19. existing_nullable=False)
  20. # ### end Alembic commands ###
  21. def downgrade():
  22. # ### commands auto generated by Alembic - please adjust! ###
  23. with op.batch_alter_table('provider_models', schema=None) as batch_op:
  24. batch_op.alter_column('model_name',
  25. existing_type=sa.String(length=255),
  26. type_=sa.VARCHAR(length=40),
  27. existing_nullable=False)
  28. # ### end Alembic commands ###