"""add cache_key to workflows table

Revision ID: f2e78df26c97
Revises: dd29417b397c
Create Date: 2025-08-06 07:04:57.428538+00:00

"""

from typing import Sequence, Union

import sqlalchemy as sa

from alembic import op

# revision identifiers, used by Alembic.
revision: str = "f2e78df26c97"
down_revision: Union[str, None] = "dd29417b397c"
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("workflows", sa.Column("cache_key", sa.String(), nullable=True))
    op.drop_column("workflows", "cache_project_id")
    # ### end Alembic commands ###


def downgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column("workflows", sa.Column("cache_project_id", sa.VARCHAR(), autoincrement=False, nullable=True))
    op.drop_column("workflows", "cache_key")
    # ### end Alembic commands ###
