"""添加system_prompt字段到settings表

Revision ID: 7899f8d4d839
Revises: a1b2c3d4e5f6
Create Date: 2025-12-27 17:00:35.440551

"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision: str = '7899f8d4d839'
down_revision: Union[str, None] = 'a1b2c3d4e5f6'
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! ###
    with op.batch_alter_table('settings', schema=None) as batch_op:
        batch_op.add_column(sa.Column('system_prompt', sa.Text(), nullable=True, comment='系统级别提示词，每次AI调用都会使用'))

    # ### end Alembic commands ###


def downgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table('settings', schema=None) as batch_op:
        batch_op.drop_column('system_prompt')

    # ### end Alembic commands ###