"""Ensure serving_size column is Float

Revision ID: d0c142fbf0b0
Revises: 13939361fc35
Create Date: 2025-10-02 00:27:05.400224

"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision: str = 'd0c142fbf0b0'
down_revision: Union[str, None] = '13939361fc35'
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! ###
    with op.batch_alter_table('foods', schema=None) as batch_op:
        batch_op.alter_column('serving_size',
               existing_type=sa.VARCHAR(),
               type_=sa.Float(),
               existing_nullable=True)
    # ### end Alembic commands ###


def downgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table('foods', schema=None) as batch_op:
        batch_op.alter_column('serving_size',
               existing_type=sa.Float(),
               type_=sa.VARCHAR(),
               existing_nullable=True)
    # ### end Alembic commands ###
