"""plex_items/plex_shows.people_enriched_at: full-cast backfill marker

Revision ID: 0057_plex_ppl_enriched
Revises: 0056_plex_people
Create Date: 2026-07-19
"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa

revision: str = "0057_plex_ppl_enriched"
down_revision: Union[str, None] = "0056_plex_people"
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
    for tbl in ("plex_items", "plex_shows"):
        op.add_column(tbl, sa.Column("people_enriched_at", sa.DateTime(timezone=True), nullable=True))


def downgrade() -> None:
    for tbl in ("plex_items", "plex_shows"):
        op.drop_column(tbl, "people_enriched_at")
