I recently did an uprade to new platform version and faced some issues. This forced me to restore a DB and fix the issues and rerun the process again until it was running successfully. This is costing me time to go through the process a few times.
I suggest that the code script are written in a way that you can run as many times as you want without the need to restore DBs. For each statement that will be generated for the upgrade should have a delete statement right before it. It is already in place in other areas why not in the upgrade of IAM or SF.