"""Add Checkout.computer_tax_id

Revision ID: e4473617a8e9
Revises: 5f981f48beef
Create Date: 2024-09-27 17:27:44.293334

"""

import sqlalchemy as sa
from alembic import op

# Polar Custom Imports
import polar.kit.tax

# revision identifiers, used by Alembic.
revision = "e4473617a8e9"
down_revision = "5f981f48beef"
branch_labels: tuple[str] | None = None
depends_on: tuple[str] | None = None


def upgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column(
        "checkouts",
        sa.Column(
            "customer_tax_id",
            polar.kit.tax.TaxIDType(astext_type=sa.Text()),
            nullable=True,
        ),
    )
    # ### end Alembic commands ###


def downgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column("checkouts", "customer_tax_id")
    # ### end Alembic commands ###
