"""Persist administrative batch holds independently of user intent.""" from alembic import op import sqlalchemy as sa revision="003" down_revision="002" branch_labels=None depends_on=None def upgrade(): bind=op.get_bind() if "hold_reasons" not in {col["name"] for col in sa.inspect(bind).get_columns("visual_batches")}: default=sa.text("('[]')") if bind.dialect.name=="mysql" else "[]" op.add_column("visual_batches",sa.Column("hold_reasons",sa.JSON(),nullable=False,server_default=default)) def downgrade():raise RuntimeError("Destructive downgrade unsupported")