"""add image_path to recipe and subtask

Revision ID: 001_image_path
Revises:
Create Date: 2026-02-20

"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa

# revision identifiers, used by Alembic.
revision: str = '001_image_path'
down_revision: Union[str, None] = None
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
    op.add_column('recipes', sa.Column('image_path', sa.String(500), nullable=True))
    op.add_column('recipe_subtasks', sa.Column('image_path', sa.String(500), nullable=True))


def downgrade() -> None:
    op.drop_column('recipe_subtasks', 'image_path')
    op.drop_column('recipes', 'image_path')
