Thanks so much for posting this! After returning to my Photos library after a couple of months of not touching it, I found that all of the referenced files on a particular volume (thousands of them) were showing as offline, and Photos would not let me reconnect them (choosing “Locate Referenced File…” did nothing – the directory selection window would not appear).

Using your guide, I was able to discover the root cause: I renamed the volume a couple of months ago, and Photos was having trouble finding those files with the old volume name stored in all the ZGENERICASSET table entries, possibly because the ZFILESYSTEMVOLUME table’s entry for the volume’s UUID didn’t match its current name.

Having edited the database manually, all of the photos are showing correctly in Photos now!