"""add best_score to model selection

Revision ID: 7ed9963e732f
Revises: 72aa496ca65b
Create Date: 2025-08-25 14:34:58.866912

"""

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 = "7ed9963e732f"
down_revision: Union[str, None] = "72aa496ca65b"
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}_model_selections",
        sa.Column("best_score", sa.JSON(), nullable=True),
    )
    # ### end Alembic commands ###


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