migration: Introduce migrate_has_error()