"""fix transcript duration type

Revision ID: 2cf0b60a9d34
Revises: ccd68dc784ff
Create Date: 2025-07-15 16:53:40.397394

"""

from typing import Sequence, Union

import sqlalchemy as sa
from alembic import op

# revision identifiers, used by Alembic.
revision: str = "2cf0b60a9d34"
down_revision: Union[str, None] = "ccd68dc784ff"
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("transcript", schema=None) as batch_op:
        batch_op.alter_column(
            "duration",
            existing_type=sa.INTEGER(),
            type_=sa.Float(),
            existing_nullable=True,
        )

    # ### end Alembic commands ###


def downgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table("transcript", schema=None) as batch_op:
        batch_op.alter_column(
            "duration",
            existing_type=sa.Float(),
            type_=sa.INTEGER(),
            existing_nullable=True,
        )

    # ### end Alembic commands ###
