Fully test and fix MigrationHistory