"""products_drop_traffic_location

Revision ID: 010
Revises: 009
Create Date: 2026-05-16 00:00:00.000000

去掉 products.traffic / products.location（前端 UI 改造后不再展示）。
"""
from typing import Sequence, Union

import sqlalchemy as sa
from alembic import op

revision: str = "010"
down_revision: Union[str, None] = "009"
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
    op.drop_column("products", "traffic")
    op.drop_column("products", "location")


def downgrade() -> None:
    op.add_column("products", sa.Column("location", sa.String(length=64), nullable=True))
    op.add_column("products", sa.Column("traffic", sa.String(length=64), nullable=True))
