Updating the referenced file path in Photos
Emil Rasmussen

Hi Emil. I really appreciated this post, as I am trying to do something that should be easy (but with Photos seems impossible grrrr). You got me most of the way there, i.e. I managed to get Photos safely shut down, then I crawled into the SQL database with sqlite browser. I have more years of SQL programming (long) behind me than I would really like to admit, so was not intimidated (much) by that.

What I need to do is move my referenced files en masse from one volume to another, not just from one folder hierarchy to another on the same volume. I quickly found fileVolumeUuid, and then after a bit of puzzlement, located the lookup table fileVolume which translates this into actual named volumes. And there were my old and new volumes. I was almost there — so close! I tried

update RKMaster set fileVolumeUuid = “HsX2600RTVGsFlHhRt5dfQ” where fileVolumeUuid = “dUoT89%YQa+haW1I2mW5HQ”

which should have worked (if the Universe were fair, which it ain’t). Instead of a lengthy SQL update (just a few tens of thousands of records), I got this error message:

no such function: RKMaster_notifyRidIndexUpdate

and this I assume is coming from a trigger; it seems odd that this function would be missing... My last experience of triggers was sometime in the mid 90s, with SQL-Server on Sun hardware. I started to try to identify the offending trigger here, but quickly ran into my lack of experience with SQLite; it’s hard even to find out how to display trigger definitions. If you have any insight that might get me through that last step, like finding that trigger, maybe dropping it during the update then reinstating it, then “somehow” re-indexing after the update, I’d be delighted. It’s been fun (sort of) getting this far, but rather frustrating to be balked by a missing function definition at the last minute.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.