"""
Update user_chat_history table - remove redundant columns

Revision ID: 0007
Revises: 0006
Create Date: 2024-12-19 14:00:00.000000

"""
from alembic import op
import sqlalchemy as sa

# revision identifiers, used by Alembic.
revision = '0007'
down_revision = '0006'
branch_labels = None
depends_on = None

def upgrade():
    # Drop the redundant columns from user_chat_history table
    op.drop_column('user_chat_history', 'name')
    op.drop_column('user_chat_history', 'email')
    op.drop_column('user_chat_history', 'phone')

def downgrade():
    # Add back the columns if needed to rollback
    op.add_column('user_chat_history', sa.Column('name', sa.String(length=255), nullable=False))
    op.add_column('user_chat_history', sa.Column('email', sa.String(length=255), nullable=False))
    op.add_column('user_chat_history', sa.Column('phone', sa.String(length=255), nullable=False))
