"""product_groups_add_network_type

Revision ID: 007
Revises: 006
Create Date: 2026-05-16 00:00:00.000000

给 product_groups 加 network_type 列，标识该组的网络线路类型
（CN2 / BGP / 国内大陆 / 香港优化 / 海外直连 等），前端按它分组或筛选展示。
"""
from typing import Sequence, Union

import sqlalchemy as sa
from alembic import op

revision: str = "007"
down_revision: Union[str, None] = "006"
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
    op.add_column(
        "product_groups",
        sa.Column("network_type", sa.String(length=32), nullable=True),
    )


def downgrade() -> None:
    op.drop_column("product_groups", "network_type")
