rearrange 5.1 intra-patch upgrade scripts