[#42312025] Run all legacy migrations before exiting if there is an error