"""202603101453

Revision ID: fb834419b18f
Revises: 1ac07dc7366f
Create Date: 2026-03-10 14:46:48.038643

"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision: str = 'fb834419b18f'
down_revision: Union[str, None] = '1ac07dc7366f'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('end_users', sa.Column('rag_tags', sa.Text(), nullable=True, comment='RAG模式下提取的标签列表（JSON格式）'))
    op.add_column('end_users', sa.Column('rag_personas', sa.Text(), nullable=True, comment='RAG模式下提取的人物形象列表（JSON格式）'))
    op.add_column('end_users', sa.Column('rag_summary_updated_at', sa.DateTime(), nullable=True, comment='RAG摘要/标签/人物形象最后更新时间'))
    # ### end Alembic commands ###


def downgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column('end_users', 'rag_summary_updated_at')
    op.drop_column('end_users', 'rag_personas')
    op.drop_column('end_users', 'rag_tags')
    # ### end Alembic commands ###
