it is correct that the migration script can breakdown with more complex migrations that is why everything is explained so you
1 tweek the migration script until it works for you
2 do the migration manually
3 rewrite aplication with v4 and migrate the data trough the apis