fix: null conversation id

This commit is contained in:
Yeuoly 2024-03-14 12:56:25 +08:00 committed by takatost
parent 737321da75
commit 6e51ce123c
1 changed files with 36 additions and 0 deletions

View File

@ -0,0 +1,36 @@
"""enable tool file without conversation id
Revision ID: 563cf8bf777b
Revises: b5429b71023c
Create Date: 2024-03-14 04:54:56.679506
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
# revision identifiers, used by Alembic.
revision = '563cf8bf777b'
down_revision = 'b5429b71023c'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('tool_files', schema=None) as batch_op:
batch_op.alter_column('conversation_id',
existing_type=postgresql.UUID(),
nullable=True)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('tool_files', schema=None) as batch_op:
batch_op.alter_column('conversation_id',
existing_type=postgresql.UUID(),
nullable=False)
# ### end Alembic commands ###