"""Per-location display switch.

Coverage becomes configuration: a location can be hidden from the whole site
(catalogue, product pages, featured, stats, sitemap) while its collector keeps
running and its price history keeps accruing. Distinct from sources.enabled,
which stops collection itself.

Revision ID: c5d6e7f8a9b0
Revises: b4c5d6e7f8a9
Create Date: 2026-08-25
"""

import sqlalchemy as sa

from alembic import op

revision = "c5d6e7f8a9b0"
down_revision = "b4c5d6e7f8a9"
branch_labels = None
depends_on = None


def upgrade() -> None:
    op.add_column(
        "locations",
        sa.Column("visible", sa.Boolean(), nullable=False, server_default=sa.true()),
    )


def downgrade() -> None:
    op.drop_column("locations", "visible")
