"""Add Transaction tax columns

Revision ID: 2132c69f413b
Revises: d289021770a8
Create Date: 2025-11-21 14:57:37.152814

"""

import sqlalchemy as sa
from alembic import op

# Polar Custom Imports

# revision identifiers, used by Alembic.
revision = "2132c69f413b"
down_revision = "d289021770a8"
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(
        "transactions", sa.Column("presentment_amount", sa.BigInteger(), nullable=True)
    )
    op.add_column(
        "transactions",
        sa.Column("presentment_tax_amount", sa.BigInteger(), nullable=True),
    )
    op.add_column(
        "transactions",
        sa.Column("presentment_currency", sa.String(length=3), nullable=True),
    )

    op.add_column(
        "transactions",
        sa.Column("tax_filing_amount", sa.BigInteger(), nullable=True),
    )
    op.add_column(
        "transactions",
        sa.Column("tax_filing_currency", sa.String(length=3), nullable=True),
    )
    op.add_column(
        "transactions",
        sa.Column("tax_processor_id", sa.String(), nullable=True),
    )
    # ### end Alembic commands ###


def downgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column("transactions", "tax_processor_id")
    op.drop_column("transactions", "tax_filing_currency")
    op.drop_column("transactions", "tax_filing_amount")
    op.drop_column("transactions", "presentment_currency")
    op.drop_column("transactions", "presentment_tax_amount")
    op.drop_column("transactions", "presentment_amount")
    # ### end Alembic commands ###
