MDL-32895: Improvements to assignment upgrade tool for large numbers of assignments.