Fixed migrations being saved when they failed