"""blueprint_overlays.expose_server_cfg

Revision ID: 0007_blueprint_overlay_expose_server_cfg
Revises: 0006_server_name_per_user
Create Date: 2026-05-08
"""
from typing import Sequence, Union

import sqlalchemy as sa
from alembic import op


revision: str = "0007_blueprint_overlay_expose_server_cfg"
down_revision: Union[str, Sequence[str], None] = "0006_server_name_per_user"
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
    op.add_column(
        "blueprint_overlays",
        sa.Column(
            "expose_server_cfg",
            sa.Boolean(),
            nullable=False,
            server_default=sa.text("0"),
        ),
    )


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