"""Add auto_close_issue_on_task_done to boards.

Revision ID: f2a3b4c5d6e7
Revises: e1f2a3b4c5d6
Create Date: 2026-05-22
"""

from __future__ import annotations

import sqlalchemy as sa
from alembic import op

revision = "f2a3b4c5d6e7"
down_revision = "e1f2a3b4c5d6"
branch_labels = None
depends_on = None


def upgrade() -> None:
    op.add_column(
        "boards",
        sa.Column(
            "auto_close_issue_on_task_done",
            sa.Boolean(),
            nullable=False,
            server_default="false",
        ),
    )
    op.alter_column("boards", "auto_close_issue_on_task_done", server_default=None)


def downgrade() -> None:
    op.drop_column("boards", "auto_close_issue_on_task_done")
