transaction for id_batch_set, new add_classnames migration