"""add_status_field_to_media_files

Revision ID: dcdfa10e65bd
Revises: b36380486760
Create Date: 2025-08-30 16:36:58.971027

"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa


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


def upgrade() -> None:
    """Upgrade schema."""
    # Add status column to media_files table
    op.add_column('media_files', sa.Column('status', sa.String(20), nullable=False, server_default='pending'))
    op.create_index(op.f('ix_media_files_status'), 'media_files', ['status'], unique=False)


def downgrade() -> None:
    """Downgrade schema."""
    # Remove status column from media_files table
    op.drop_index(op.f('ix_media_files_status'), table_name='media_files')
    op.drop_column('media_files', 'status')
