Files
MemoryBear/api/migrations/versions/fb834419b18f_202603101453.py
2026-03-10 14:51:48 +08:00

35 lines
1.2 KiB
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"""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 ###