def METHOD_NAME() -> None:
    bind = op.get_bind()
    inspector = sa.inspect(bind)
    tables = inspector.get_table_names()
    assert "trial_params" in tables
    session = orm.Session(bind=bind)
    try:
        distributions: List[BaseDistribution] = []
        for distribution in session.query(TrialParamModel).yield_per(BATCH_SIZE):
            distribution.distribution_json = migrate_new_distribution(
                distribution.distribution_json,
            )
            distributions.append(distribution)
            if len(distributions) == BATCH_SIZE:
                persist(session, distributions)
                distributions = []
        persist(session, distributions)
    except SQLAlchemyError as e:
        session.rollback()
        raise e
    finally:
        session.close()