"""202603061644

Revision ID: 1ac07dc7366f
Revises: 6a4641cf192b
Create Date: 2026-03-06 16:51:10.152305

"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision: str = '1ac07dc7366f'
down_revision: Union[str, None] = '6a4641cf192b'
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('mcp_tool_configs', sa.Column('source_channel', sa.String(length=50), server_default=sa.text("'self_hosted'"), nullable=False, comment='来源渠道'))
    op.add_column('mcp_tool_configs', sa.Column('market_id', sa.UUID(), nullable=True, comment='渠道市场id'))
    op.add_column('mcp_tool_configs', sa.Column('market_config_id', sa.UUID(), nullable=True, comment='渠道市场配置id'))
    op.add_column('mcp_tool_configs', sa.Column('mcp_service_id', sa.String(length=255), nullable=True, comment='mcp服务id'))
    # ### end Alembic commands ###


def downgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column('mcp_tool_configs', 'mcp_service_id')
    op.drop_column('mcp_tool_configs', 'market_config_id')
    op.drop_column('mcp_tool_configs', 'market_id')
    op.drop_column('mcp_tool_configs', 'source_channel')
    # ### end Alembic commands ###
