8ec536f3c800_rename_api_provider_credentails.py 843 B

12345678910111213141516171819202122232425262728293031
  1. """rename api provider credentials
  2. Revision ID: 8ec536f3c800
  3. Revises: ad472b61a054
  4. Create Date: 2024-01-07 03:57:35.257545
  5. """
  6. import sqlalchemy as sa
  7. from alembic import op
  8. # revision identifiers, used by Alembic.
  9. revision = '8ec536f3c800'
  10. down_revision = 'ad472b61a054'
  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('credentials_str', sa.Text(), nullable=False))
  17. # ### end Alembic commands ###
  18. def downgrade():
  19. # ### commands auto generated by Alembic - please adjust! ###
  20. with op.batch_alter_table('tool_api_providers', schema=None) as batch_op:
  21. batch_op.drop_column('credentials_str')
  22. # ### end Alembic commands ###