"""add canceled_at to WorkflowRun schema

Revision ID: 5b9dd35eb10b
Revises: 5ebc9fcfc1c7
Create Date: 2024-09-05 21:16:01.841467

"""

from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa
import sqlmodel  # noqa F401


# revision identifiers, used by Alembic.
revision: str = "5b9dd35eb10b"
down_revision: Union[str, None] = "5ebc9fcfc1c7"
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column(
        "workflow_runs", sa.Column("canceled_at", sa.TIMESTAMP(), nullable=True)
    )
    # ### end Alembic commands ###


def downgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column("workflow_runs", "canceled_at")
    # ### end Alembic commands ###
