"""Video versions (plan step 5.4e): a video's still frame and a version every screen plays are made in the background after the upload; the library shows how far it got. Videos already in the library are queued (`waiting`) so they get theirs too. Revision ID: 0031_video_versions Revises: 0030_signage_schedules Create Date: 2026-11-18 09:00:00 """ from alembic import op import sqlalchemy as sa revision = '0031_video_versions' down_revision = '0030_signage_schedules' branch_labels = None depends_on = None def upgrade() -> None: with op.batch_alter_table('media', schema=None) as batch_op: batch_op.add_column(sa.Column('processing', sa.String(), nullable=True)) batch_op.add_column(sa.Column('progress', sa.Integer(), nullable=True)) op.execute("UPDATE media SET processing = 'waiting' WHERE kind = 'video'") def downgrade() -> None: with op.batch_alter_table('media', schema=None) as batch_op: batch_op.drop_column('progress') batch_op.drop_column('processing')