"""

Revision ID: bf6b86dd5463
Revises: 17e51420e7ad
Create Date: 2025-07-11 18:32:21.450156

"""

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 = "bf6b86dd5463"
down_revision: Union[str, None] = "17e51420e7ad"
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("momentum", sa.Float(), nullable=True))
        batch_op.create_index("ix_analysis_momentum", ["momentum"], 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_momentum")
        batch_op.drop_column("momentum")

    # ### end Alembic commands ###
