"""add missing fk_eval_monitors_last_run_id constraint

Revision ID: 1c98dcbcf360
Revises: fb266e680e34
Create Date: 2026-03-12 16:36:40.854619
"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision: str = '1c98dcbcf360'
down_revision: Union[str, None] = 'fb266e680e34'
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.create_foreign_key('fk_eval_monitors_last_run_id', 'eval_monitors', 'eval_runs', ['last_run_id'], ['id'], ondelete='SET NULL', use_alter=True)
    # ### end Alembic commands ###


def downgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint('fk_eval_monitors_last_run_id', 'eval_monitors', type_='foreignkey')
    # ### end Alembic commands ###
