"""Make Checkout.product_id and product_price_id nullable

Revision ID: f3cbc3937937
Revises: 2c7d8141f6b4
Create Date: 2025-10-31 10:44:00.793740

"""

import sqlalchemy as sa
from alembic import op

# Polar Custom Imports

# revision identifiers, used by Alembic.
revision = "f3cbc3937937"
down_revision = "2c7d8141f6b4"
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("checkouts", "product_id", existing_type=sa.UUID(), nullable=True)
    op.alter_column(
        "checkouts", "product_price_id", existing_type=sa.UUID(), nullable=True
    )
    # ### end Alembic commands ###


def downgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column(
        "checkouts", "product_price_id", existing_type=sa.UUID(), nullable=False
    )
    op.alter_column("checkouts", "product_id", existing_type=sa.UUID(), nullable=False)
    # ### end Alembic commands ###
