"""Remove enterprise plan type, migrate existing enterprise tenants to team

Revision ID: f9g0h1i2j3k4
Revises: f83e6b217209
Create Date: 2026-07-08

"""
from typing import Sequence, Union

from alembic import op

revision: str = 'f9g0h1i2j3k4'
down_revision: Union[str, None] = 'b5dbd2bb5988'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
    op.execute("UPDATE tenants SET plan_type = 'team' WHERE plan_type = 'enterprise'")



def downgrade() -> None:
    # 无法逆向区分哪些曾是 enterprise
    pass
