An upgrade has nothing to do with photos disappearing at all.
Your issue is you yourself moved directories so in essence you changed the data directory where your photos are stored and never updated your actual photopost to the new changed paths. Therefore when you ran a scan database without fixing your path you where telling the program wrong server pathing and since it did not find the photos it correctly deleted any entries it could not find from the database. That is proper program operation.
We all learn from mistakes and its an easy fix. The correct action would have been correct and verify any server paths before you ran a scan database. If that had been done your photos would have shown.
The way to fix your issue would be to simply restore a backup of your pp_photos table from an sql backup you have done. All your photos would then show.