"""20251125181327

Revision ID: 6e254c5f498e
Revises: a09d0e19cde6
Create Date: 2025-11-25 18:13:36.873990

"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision: str = '6e254c5f498e'
down_revision: Union[str, None] = 'a09d0e19cde6'
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.alter_column('data_config', 'llm_id',
               existing_type=sa.VARCHAR(),
               comment='LLM模型配置ID',
               existing_nullable=True)
    op.alter_column('data_config', 'embedding_id',
               existing_type=sa.VARCHAR(),
               comment='嵌入模型配置ID',
               existing_nullable=True)
    op.add_column('workspaces', sa.Column('storage_type', sa.String(), nullable=True))
    # ### end Alembic commands ###


def downgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column('workspaces', 'storage_type')
    op.alter_column('data_config', 'embedding_id',
               existing_type=sa.VARCHAR(),
               comment=None,
               existing_comment='嵌入模型配置ID',
               existing_nullable=True)
    op.alter_column('data_config', 'llm_id',
               existing_type=sa.VARCHAR(),
               comment=None,
               existing_comment='LLM模型配置ID',
               existing_nullable=True)
    # ### end Alembic commands ###
