"""add analysis model override to campaigns

Revision ID: b7e4d3a92c15
Revises: a3f9c2e71b48
Create Date: 2026-08-03
"""

from typing import Sequence, Union

import sqlalchemy as sa
import sqlmodel  # noqa: F401
from alembic import op

revision: str = "b7e4d3a92c15"
down_revision: Union[str, Sequence[str], None] = "a3f9c2e71b48"
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
    with op.batch_alter_table("campaigns", schema=None) as batch_op:
        batch_op.add_column(
            sa.Column("analysis_model_config_id", sqlmodel.sql.sqltypes.AutoString(), nullable=True)
        )


def downgrade() -> None:
    with op.batch_alter_table("campaigns", schema=None) as batch_op:
        batch_op.drop_column("analysis_model_config_id")
