8ae9bc661daa_add_tool_conversation_variables_idx.py 962 B

123456789101112131415161718192021222324252627282930313233
  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. # revision identifiers, used by Alembic.
  8. revision = '8ae9bc661daa'
  9. down_revision = '9fafbd60eca1'
  10. branch_labels = None
  11. depends_on = None
  12. def upgrade():
  13. # ### commands auto generated by Alembic - please adjust! ###
  14. with op.batch_alter_table('tool_conversation_variables', schema=None) as batch_op:
  15. batch_op.create_index('conversation_id_idx', ['conversation_id'], unique=False)
  16. batch_op.create_index('user_id_idx', ['user_id'], unique=False)
  17. # ### end Alembic commands ###
  18. def downgrade():
  19. # ### commands auto generated by Alembic - please adjust! ###
  20. with op.batch_alter_table('tool_conversation_variables', schema=None) as batch_op:
  21. batch_op.drop_index('user_id_idx')
  22. batch_op.drop_index('conversation_id_idx')
  23. # ### end Alembic commands ###