8ae9bc661daa_add_tool_conversation_variables_idx.py 987 B

1234567891011121314151617181920212223242526272829303132333435
  1. """add tool conversation variables idx
  2. Revision ID: 8ae9bc661daa
  3. Revises: 9fafbd60eca1
  4. Create Date: 2024-01-15 14:22:03.597692
  5. """
  6. from alembic import op
  7. import sqlalchemy as sa
  8. # revision identifiers, used by Alembic.
  9. revision = '8ae9bc661daa'
  10. down_revision = '9fafbd60eca1'
  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_conversation_variables', schema=None) as batch_op:
  16. batch_op.create_index('conversation_id_idx', ['conversation_id'], unique=False)
  17. batch_op.create_index('user_id_idx', ['user_id'], unique=False)
  18. # ### end Alembic commands ###
  19. def downgrade():
  20. # ### commands auto generated by Alembic - please adjust! ###
  21. with op.batch_alter_table('tool_conversation_variables', schema=None) as batch_op:
  22. batch_op.drop_index('user_id_idx')
  23. batch_op.drop_index('conversation_id_idx')
  24. # ### end Alembic commands ###