The 485/486 upgrade gets rid of the userid being prepended on the filename so the last step renamed the photos in the photos table thus you only run this once
The second step renames and moves the medium and thumbnail images into there own directories since we no longer make the images image-med.jpg and image-thumb.jpg
Thats why all the moving
Okay I mean restore the photos table meaning you would dump the current messed up photos table and restore with a backup of the photos table. You then can rerun any necessary upgrades.
With alot of photos this will take a while. I have had the upgrade take 6 hours on one install with 90000 images