"""

Revision ID: 11d35a452b40
Revises: 73564b60fe24
Create Date: 2025-06-23 06:02:07.122505

"""

from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa

# revision identifiers, used by Alembic.
revision: str = "11d35a452b40"
down_revision: Union[str, None] = "73564b60fe24"
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.alter_column(
            "quarterly_positive_free_cash_flow",
            existing_type=sa.FLOAT(),
            type_=sa.Boolean(),
            existing_nullable=True,
        )
        batch_op.alter_column(
            "quarterly_growing_operating_cash_flow",
            existing_type=sa.FLOAT(),
            type_=sa.Boolean(),
            existing_nullable=True,
        )
        batch_op.alter_column(
            "quarterly_operating_cash_flow_is_higher_than_net_income",
            existing_type=sa.FLOAT(),
            type_=sa.Boolean(),
            existing_nullable=True,
        )
        batch_op.alter_column(
            "quarterly_positive_net_income",
            existing_type=sa.FLOAT(),
            type_=sa.Boolean(),
            existing_nullable=True,
        )
        batch_op.alter_column(
            "quarterly_positive_operating_income",
            existing_type=sa.FLOAT(),
            type_=sa.Boolean(),
            existing_nullable=True,
        )
        batch_op.alter_column(
            "quarterly_growing_net_income",
            existing_type=sa.FLOAT(),
            type_=sa.Boolean(),
            existing_nullable=True,
        )
        batch_op.alter_column(
            "quarterly_growing_operating_income",
            existing_type=sa.FLOAT(),
            type_=sa.Boolean(),
            existing_nullable=True,
        )
        batch_op.alter_column(
            "quarterly_positive_diluted_eps",
            existing_type=sa.FLOAT(),
            type_=sa.Boolean(),
            existing_nullable=True,
        )
        batch_op.alter_column(
            "quarterly_positive_basic_eps",
            existing_type=sa.FLOAT(),
            type_=sa.Boolean(),
            existing_nullable=True,
        )
        batch_op.alter_column(
            "quarterly_growing_basic_eps",
            existing_type=sa.FLOAT(),
            type_=sa.Boolean(),
            existing_nullable=True,
        )
        batch_op.alter_column(
            "quarterly_growing_diluted_eps",
            existing_type=sa.FLOAT(),
            type_=sa.Boolean(),
            existing_nullable=True,
        )
        batch_op.alter_column(
            "quarterly_positive_debt_to_equity",
            existing_type=sa.FLOAT(),
            type_=sa.Boolean(),
            existing_nullable=True,
        )
        batch_op.alter_column(
            "quarterly_positive_return_on_assets",
            existing_type=sa.FLOAT(),
            type_=sa.Boolean(),
            existing_nullable=True,
        )
        batch_op.alter_column(
            "quarterly_positive_return_on_equity",
            existing_type=sa.FLOAT(),
            type_=sa.Boolean(),
            existing_nullable=True,
        )
        batch_op.alter_column(
            "positive_free_cash_flow",
            existing_type=sa.FLOAT(),
            type_=sa.Boolean(),
            existing_nullable=True,
        )
        batch_op.alter_column(
            "growing_operating_cash_flow",
            existing_type=sa.FLOAT(),
            type_=sa.Boolean(),
            existing_nullable=True,
        )
        batch_op.alter_column(
            "operating_cash_flow_is_higher_than_net_income",
            existing_type=sa.FLOAT(),
            type_=sa.Boolean(),
            existing_nullable=True,
        )
        batch_op.alter_column(
            "positive_net_income",
            existing_type=sa.FLOAT(),
            type_=sa.Boolean(),
            existing_nullable=True,
        )
        batch_op.alter_column(
            "positive_operating_income",
            existing_type=sa.FLOAT(),
            type_=sa.Boolean(),
            existing_nullable=True,
        )
        batch_op.alter_column(
            "growing_net_income",
            existing_type=sa.FLOAT(),
            type_=sa.Boolean(),
            existing_nullable=True,
        )
        batch_op.alter_column(
            "growing_operating_income",
            existing_type=sa.FLOAT(),
            type_=sa.Boolean(),
            existing_nullable=True,
        )
        batch_op.alter_column(
            "positive_diluted_eps",
            existing_type=sa.FLOAT(),
            type_=sa.Boolean(),
            existing_nullable=True,
        )
        batch_op.alter_column(
            "positive_basic_eps",
            existing_type=sa.FLOAT(),
            type_=sa.Boolean(),
            existing_nullable=True,
        )
        batch_op.alter_column(
            "growing_basic_eps",
            existing_type=sa.FLOAT(),
            type_=sa.Boolean(),
            existing_nullable=True,
        )
        batch_op.alter_column(
            "growing_diluted_eps",
            existing_type=sa.FLOAT(),
            type_=sa.Boolean(),
            existing_nullable=True,
        )
        batch_op.alter_column(
            "positive_debt_to_equity",
            existing_type=sa.FLOAT(),
            type_=sa.Boolean(),
            existing_nullable=True,
        )
        batch_op.alter_column(
            "positive_return_on_assets",
            existing_type=sa.FLOAT(),
            type_=sa.Boolean(),
            existing_nullable=True,
        )
        batch_op.alter_column(
            "positive_return_on_equity",
            existing_type=sa.FLOAT(),
            type_=sa.Boolean(),
            existing_nullable=True,
        )

    # ### 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.alter_column(
            "positive_return_on_equity",
            existing_type=sa.Boolean(),
            type_=sa.FLOAT(),
            existing_nullable=True,
        )
        batch_op.alter_column(
            "positive_return_on_assets",
            existing_type=sa.Boolean(),
            type_=sa.FLOAT(),
            existing_nullable=True,
        )
        batch_op.alter_column(
            "positive_debt_to_equity",
            existing_type=sa.Boolean(),
            type_=sa.FLOAT(),
            existing_nullable=True,
        )
        batch_op.alter_column(
            "growing_diluted_eps",
            existing_type=sa.Boolean(),
            type_=sa.FLOAT(),
            existing_nullable=True,
        )
        batch_op.alter_column(
            "growing_basic_eps",
            existing_type=sa.Boolean(),
            type_=sa.FLOAT(),
            existing_nullable=True,
        )
        batch_op.alter_column(
            "positive_basic_eps",
            existing_type=sa.Boolean(),
            type_=sa.FLOAT(),
            existing_nullable=True,
        )
        batch_op.alter_column(
            "positive_diluted_eps",
            existing_type=sa.Boolean(),
            type_=sa.FLOAT(),
            existing_nullable=True,
        )
        batch_op.alter_column(
            "growing_operating_income",
            existing_type=sa.Boolean(),
            type_=sa.FLOAT(),
            existing_nullable=True,
        )
        batch_op.alter_column(
            "growing_net_income",
            existing_type=sa.Boolean(),
            type_=sa.FLOAT(),
            existing_nullable=True,
        )
        batch_op.alter_column(
            "positive_operating_income",
            existing_type=sa.Boolean(),
            type_=sa.FLOAT(),
            existing_nullable=True,
        )
        batch_op.alter_column(
            "positive_net_income",
            existing_type=sa.Boolean(),
            type_=sa.FLOAT(),
            existing_nullable=True,
        )
        batch_op.alter_column(
            "operating_cash_flow_is_higher_than_net_income",
            existing_type=sa.Boolean(),
            type_=sa.FLOAT(),
            existing_nullable=True,
        )
        batch_op.alter_column(
            "growing_operating_cash_flow",
            existing_type=sa.Boolean(),
            type_=sa.FLOAT(),
            existing_nullable=True,
        )
        batch_op.alter_column(
            "positive_free_cash_flow",
            existing_type=sa.Boolean(),
            type_=sa.FLOAT(),
            existing_nullable=True,
        )
        batch_op.alter_column(
            "quarterly_positive_return_on_equity",
            existing_type=sa.Boolean(),
            type_=sa.FLOAT(),
            existing_nullable=True,
        )
        batch_op.alter_column(
            "quarterly_positive_return_on_assets",
            existing_type=sa.Boolean(),
            type_=sa.FLOAT(),
            existing_nullable=True,
        )
        batch_op.alter_column(
            "quarterly_positive_debt_to_equity",
            existing_type=sa.Boolean(),
            type_=sa.FLOAT(),
            existing_nullable=True,
        )
        batch_op.alter_column(
            "quarterly_growing_diluted_eps",
            existing_type=sa.Boolean(),
            type_=sa.FLOAT(),
            existing_nullable=True,
        )
        batch_op.alter_column(
            "quarterly_growing_basic_eps",
            existing_type=sa.Boolean(),
            type_=sa.FLOAT(),
            existing_nullable=True,
        )
        batch_op.alter_column(
            "quarterly_positive_basic_eps",
            existing_type=sa.Boolean(),
            type_=sa.FLOAT(),
            existing_nullable=True,
        )
        batch_op.alter_column(
            "quarterly_positive_diluted_eps",
            existing_type=sa.Boolean(),
            type_=sa.FLOAT(),
            existing_nullable=True,
        )
        batch_op.alter_column(
            "quarterly_growing_operating_income",
            existing_type=sa.Boolean(),
            type_=sa.FLOAT(),
            existing_nullable=True,
        )
        batch_op.alter_column(
            "quarterly_growing_net_income",
            existing_type=sa.Boolean(),
            type_=sa.FLOAT(),
            existing_nullable=True,
        )
        batch_op.alter_column(
            "quarterly_positive_operating_income",
            existing_type=sa.Boolean(),
            type_=sa.FLOAT(),
            existing_nullable=True,
        )
        batch_op.alter_column(
            "quarterly_positive_net_income",
            existing_type=sa.Boolean(),
            type_=sa.FLOAT(),
            existing_nullable=True,
        )
        batch_op.alter_column(
            "quarterly_operating_cash_flow_is_higher_than_net_income",
            existing_type=sa.Boolean(),
            type_=sa.FLOAT(),
            existing_nullable=True,
        )
        batch_op.alter_column(
            "quarterly_growing_operating_cash_flow",
            existing_type=sa.Boolean(),
            type_=sa.FLOAT(),
            existing_nullable=True,
        )
        batch_op.alter_column(
            "quarterly_positive_free_cash_flow",
            existing_type=sa.Boolean(),
            type_=sa.FLOAT(),
            existing_nullable=True,
        )

    # ### end Alembic commands ###
