"""add totp_verification_url to tasks, workflows and workflow_runs tables

Revision ID: 370cb81c73e7
Revises: ac679ea03578
Create Date: 2024-07-12 03:21:27.128748+00:00

"""

from typing import Sequence, Union

import sqlalchemy as sa

from alembic import op

# revision identifiers, used by Alembic.
revision: str = "370cb81c73e7"
down_revision: Union[str, None] = "ac679ea03578"
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("tasks", sa.Column("totp_verification_url", sa.String(), nullable=True))
    op.add_column("workflow_runs", sa.Column("totp_verification_url", sa.String(), nullable=True))
    op.add_column("workflows", sa.Column("totp_verification_url", sa.String(), nullable=True))
    # ### end Alembic commands ###


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