00bacef91f18_rename_api_provider_description.py 989 B

12345678910111213141516171819202122232425262728293031323334
  1. """rename api provider description
  2. Revision ID: 00bacef91f18
  3. Revises: 8ec536f3c800
  4. Create Date: 2024-01-07 04:07:34.482983
  5. """
  6. import sqlalchemy as sa
  7. from alembic import op
  8. # revision identifiers, used by Alembic.
  9. revision = '00bacef91f18'
  10. down_revision = '8ec536f3c800'
  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('tool_api_providers', schema=None) as batch_op:
  16. batch_op.add_column(sa.Column('description', sa.Text(), nullable=False))
  17. batch_op.drop_column('description_str')
  18. # ### end Alembic commands ###
  19. def downgrade():
  20. # ### commands auto generated by Alembic - please adjust! ###
  21. with op.batch_alter_table('tool_api_providers', schema=None) as batch_op:
  22. batch_op.add_column(sa.Column('description_str', sa.TEXT(), autoincrement=False, nullable=False))
  23. batch_op.drop_column('description')
  24. # ### end Alembic commands ###