"""add campaigns.last_patrolled_at watermark

Revision ID: c5d8f0a2e4b7
Revises: b3c7d9e1f5a2
Create Date: 2026-08-03
"""

from typing import Sequence, Union

import sqlalchemy as sa
from alembic import op

revision: str = "c5d8f0a2e4b7"
down_revision: Union[str, Sequence[str], None] = "b3c7d9e1f5a2"
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") as batch_op:
        batch_op.add_column(sa.Column("last_patrolled_at", sa.DateTime(), nullable=True))


def downgrade() -> None:
    with op.batch_alter_table("campaigns") as batch_op:
        batch_op.drop_column("last_patrolled_at")
