"""price growth

Revision ID: cdd35bc43771
Revises: 0cb6e9038375
Create Date: 2025-04-05 13:03:03.756331

"""

from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision: str = "cdd35bc43771"
down_revision: Union[str, None] = "0cb6e9038375"
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("year_to_date_growth", sa.Float(), nullable=True))
        batch_op.add_column(
            sa.Column("last_52_weeks_growth", sa.Float(), nullable=True)
        )
        batch_op.add_column(sa.Column("last_week_growth", sa.Float(), nullable=True))
        batch_op.add_column(sa.Column("last_month_growth", sa.Float(), nullable=True))
        batch_op.add_column(sa.Column("last_year_growth", sa.Float(), 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.drop_column("last_year_growth")
        batch_op.drop_column("last_month_growth")
        batch_op.drop_column("last_week_growth")
        batch_op.drop_column("last_52_weeks_growth")
        batch_op.drop_column("year_to_date_growth")

    # ### end Alembic commands ###
