51 lines
2.5 KiB
Python
51 lines
2.5 KiB
Python
"""202512231644
|
|
|
|
Revision ID: f3d893ccb866
|
|
Revises: 022550fdcfda
|
|
Create Date: 2025-12-23 16:47:30.897690
|
|
|
|
"""
|
|
from typing import Sequence, Union
|
|
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision: str = 'f3d893ccb866'
|
|
down_revision: Union[str, None] = '022550fdcfda'
|
|
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('name', sa.String(), nullable=True, comment='姓名'))
|
|
op.add_column('end_users', sa.Column('position', sa.String(), nullable=True, comment='职位'))
|
|
op.add_column('end_users', sa.Column('department', sa.String(), nullable=True, comment='部门'))
|
|
op.add_column('end_users', sa.Column('contact', sa.String(), nullable=True, comment='联系方式'))
|
|
op.add_column('end_users', sa.Column('phone', sa.String(), nullable=True, comment='电话'))
|
|
op.add_column('end_users', sa.Column('hire_date', sa.BigInteger(), nullable=True, comment='入职日期(时间戳,毫秒)'))
|
|
op.add_column('end_users', sa.Column('updatetime_profile', sa.BigInteger(), nullable=True, comment='核心档案信息最后更新时间(时间戳,毫秒)'))
|
|
op.add_column('end_users', sa.Column('memory_insight', sa.Text(), nullable=True, comment='缓存的记忆洞察报告'))
|
|
op.add_column('end_users', sa.Column('user_summary', sa.Text(), nullable=True, comment='缓存的用户摘要'))
|
|
op.add_column('end_users', sa.Column('memory_insight_updated_at', sa.DateTime(), nullable=True, comment='洞察报告最后更新时间'))
|
|
op.add_column('end_users', sa.Column('user_summary_updated_at', sa.DateTime(), nullable=True, comment='用户摘要最后更新时间'))
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
def downgrade() -> None:
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.drop_column('end_users', 'user_summary_updated_at')
|
|
op.drop_column('end_users', 'memory_insight_updated_at')
|
|
op.drop_column('end_users', 'user_summary')
|
|
op.drop_column('end_users', 'memory_insight')
|
|
op.drop_column('end_users', 'updatetime_profile')
|
|
op.drop_column('end_users', 'hire_date')
|
|
op.drop_column('end_users', 'phone')
|
|
op.drop_column('end_users', 'contact')
|
|
op.drop_column('end_users', 'department')
|
|
op.drop_column('end_users', 'position')
|
|
op.drop_column('end_users', 'name')
|
|
# ### end Alembic commands ###
|