move upgrade script to the next free slot

The merge was after the 4.0.17 release.
This should have been part of 3a1c534.
Merge branch '4.0/move-misversioned-upgrade' into 4.0-trunk