"""add avg precision to score

Revision ID: c36e9fee22b9
Revises: 7ed9963e732f
Create Date: 2025-08-28 15:16:34.657593

"""

from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa
from lecrapaud.config import LECRAPAUD_TABLE_PREFIX

# revision identifiers, used by Alembic.
revision: str = "c36e9fee22b9"
down_revision: Union[str, None] = "7ed9963e732f"
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! ###
    op.add_column(
        f"{LECRAPAUD_TABLE_PREFIX}_scores",
        sa.Column("avg_precision", sa.Float(), nullable=True),
    )
    # ### end Alembic commands ###


def downgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column(f"{LECRAPAUD_TABLE_PREFIX}_scores", "avg_precision")
    # ### end Alembic commands ###
