"""add cancelled_by to tasks

Revision ID: 548f6ca3e91c
Revises: c9b24204c0de
Create Date: 2026-04-09 13:59:53.995402

"""

from collections.abc import Sequence

import sqlalchemy as sa

from alembic import op

# revision identifiers, used by Alembic.
revision: str = "548f6ca3e91c"
down_revision: str | Sequence[str] | None = "c9b24204c0de"
branch_labels: str | Sequence[str] | None = None
depends_on: str | Sequence[str] | None = None


def upgrade() -> None:
    """Upgrade schema."""
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table("tasks", schema=None) as batch_op:
        batch_op.add_column(sa.Column("cancelled_by", sa.String(), nullable=True))

    # ### end Alembic commands ###


def downgrade() -> None:
    """Downgrade schema."""
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table("tasks", schema=None) as batch_op:
        batch_op.drop_column("cancelled_by")

    # ### end Alembic commands ###
