"""038_remove_chat_record_cloumns

Revision ID: fc23c4f3e755
Revises: 68a06302cf70
Create Date: 2025-08-21 14:34:59.149410

"""
from alembic import op
import sqlalchemy as sa
import sqlmodel.sql.sqltypes
from sqlalchemy.dialects import postgresql

# revision identifiers, used by Alembic.
revision = 'fc23c4f3e755'
down_revision = '68a06302cf70'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column('chat_record', 'token_predict')
    op.drop_column('chat_record', 'token_select_datasource_question')
    op.drop_column('chat_record', 'token_sql')
    op.drop_column('chat_record', 'full_analysis_message')
    op.drop_column('chat_record', 'full_recommended_question_message')
    op.drop_column('chat_record', 'token_chart')
    op.drop_column('chat_record', 'full_predict_message')
    op.drop_column('chat_record', 'full_chart_message')
    op.drop_column('chat_record', 'full_sql_message')
    op.drop_column('chat_record', 'full_select_datasource_message')
    op.drop_column('chat_record', 'token_recommended_question')
    op.drop_column('chat_record', 'token_analysis')
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('chat_record', sa.Column('token_analysis', sa.VARCHAR(length=256), autoincrement=False, nullable=True))
    op.add_column('chat_record', sa.Column('token_recommended_question', sa.VARCHAR(length=256), autoincrement=False, nullable=True))
    op.add_column('chat_record', sa.Column('full_select_datasource_message', sa.TEXT(), autoincrement=False, nullable=True))
    op.add_column('chat_record', sa.Column('full_sql_message', sa.TEXT(), autoincrement=False, nullable=True))
    op.add_column('chat_record', sa.Column('full_chart_message', sa.TEXT(), autoincrement=False, nullable=True))
    op.add_column('chat_record', sa.Column('full_predict_message', sa.TEXT(), autoincrement=False, nullable=True))
    op.add_column('chat_record', sa.Column('token_chart', sa.VARCHAR(length=256), autoincrement=False, nullable=True))
    op.add_column('chat_record', sa.Column('full_recommended_question_message', sa.TEXT(), autoincrement=False, nullable=True))
    op.add_column('chat_record', sa.Column('full_analysis_message', sa.TEXT(), autoincrement=False, nullable=True))
    op.add_column('chat_record', sa.Column('token_sql', sa.VARCHAR(length=256), autoincrement=False, nullable=True))
    op.add_column('chat_record', sa.Column('token_select_datasource_question', sa.VARCHAR(length=256), autoincrement=False, nullable=True))
    op.add_column('chat_record', sa.Column('token_predict', sa.VARCHAR(length=256), autoincrement=False, nullable=True))
    # ### end Alembic commands ###
