"""Make ProductPriceMeteredUnit.unit_amount a NUMERIC

Revision ID: 52b2bd17adcf
Revises: b8cab456f609
Create Date: 2025-04-08 14:35:24.880483

"""

import sqlalchemy as sa
from alembic import op

# Polar Custom Imports

# revision identifiers, used by Alembic.
revision = "52b2bd17adcf"
down_revision = "b8cab456f609"
branch_labels: tuple[str] | None = None
depends_on: tuple[str] | None = None


def upgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column(
        "product_prices",
        "unit_amount",
        existing_type=sa.INTEGER(),
        type_=sa.Numeric(precision=17, scale=12),
        existing_nullable=True,
    )
    # ### end Alembic commands ###


def downgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column(
        "product_prices",
        "unit_amount",
        existing_type=sa.Numeric(precision=17, scale=12),
        type_=sa.INTEGER(),
        existing_nullable=True,
    )
    # ### end Alembic commands ###
