"""Add Order.from_balance_amount

Revision ID: 58d4a7f5f6bb
Revises: 90ceeb8168c2
Create Date: 2025-09-18 15:41:16.869941

"""

import sqlalchemy as sa
from alembic import op

# Polar Custom Imports

# revision identifiers, used by Alembic.
revision = "58d4a7f5f6bb"
down_revision = "90ceeb8168c2"
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(
        "orders",
        sa.Column(
            "from_balance_amount",
            sa.Integer(),
            nullable=False,
            server_default=sa.text("0"),
        ),
    )
    # ### end Alembic commands ###


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