Session_id was not correctly stored for chat sessions, and it was defined as an integer iso a UUID in the database

This commit is contained in:
Josako
2024-09-27 11:24:43 +02:00
parent d9cb00fcdc
commit ae697df4c9
3 changed files with 41 additions and 3 deletions

View File

@@ -0,0 +1,38 @@
"""session_id is uuid iso integeger
Revision ID: 829094f07d44
Revises: 2cbdb23ae02e
Create Date: 2024-09-27 09:19:13.201988
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '829094f07d44'
down_revision = '2cbdb23ae02e'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('business_event_log', schema=None) as batch_op:
batch_op.alter_column('chat_session_id',
existing_type=sa.INTEGER(),
type_=sa.String(length=50),
existing_nullable=True)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('business_event_log', schema=None) as batch_op:
batch_op.alter_column('chat_session_id',
existing_type=sa.String(length=50),
type_=sa.INTEGER(),
existing_nullable=True)
# ### end Alembic commands ###