"""

Revision ID: 4ee82b171449
Revises: ae444f338124
Create Date: 2025-08-10 12:16:03.791151

"""

from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import sqlite

# revision identifiers, used by Alembic.
revision: str = "4ee82b171449"
down_revision: Union[str, None] = "ae444f338124"
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table("analysis", schema=None) as batch_op:
        batch_op.add_column(sa.Column("upside", sa.Float(), nullable=True))
        batch_op.create_index("ix_analysis_upside", ["upside"], unique=False)

    # ### end Alembic commands ###


def downgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table("analysis", schema=None) as batch_op:
        batch_op.drop_index("ix_analysis_upside")
        batch_op.drop_column("upside")
