563cf8bf777b_enable_tool_file_without_conversation_id.py 977 B

123456789101112131415161718192021222324252627282930313233343536
  1. """enable tool file without conversation id
  2. Revision ID: 563cf8bf777b
  3. Revises: b5429b71023c
  4. Create Date: 2024-03-14 04:54:56.679506
  5. """
  6. from alembic import op
  7. from sqlalchemy.dialects import postgresql
  8. # revision identifiers, used by Alembic.
  9. revision = '563cf8bf777b'
  10. down_revision = 'b5429b71023c'
  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_files', schema=None) as batch_op:
  16. batch_op.alter_column('conversation_id',
  17. existing_type=postgresql.UUID(),
  18. nullable=True)
  19. # ### end Alembic commands ###
  20. def downgrade():
  21. # ### commands auto generated by Alembic - please adjust! ###
  22. with op.batch_alter_table('tool_files', schema=None) as batch_op:
  23. batch_op.alter_column('conversation_id',
  24. existing_type=postgresql.UUID(),
  25. nullable=False)
  26. # ### end Alembic commands ###