I’ve been using Digikam to organize my photo portfolio into albums and tags for quite a while. I have something like 2500 photos, with a few albums and a LOT of tags. The new version of Fedora comes with KDE 4, which apparently includes a new version of digikam. Normally this would be a good thing – more features, prettier interface, etc. Unfortunately, the new version’s database is a little different, so it’s gotta import photo info from the old database. Sadly, it failed to import mine for some reason, maybe because I have so many tags or photos. It started up fine with just the photos, making a new database from scratch, but my old tags obviously weren’t there.

I thought about just waiting patiently for an update to digikam to see if that’d fix it, but I figured I’d poke around in the meantime. Digikam stores its photo info in a SQLite database, which can be messed with using the SQLite Manager add-on for Firefox. Sounds strange, looks pretty ugly, but it works well enough. SQLite databases are just files so I made a copy of my old database and the new, empty database to work with. The old and new databases looked pretty similar – there are just a few new tables and some tables have new fields. The tag-related fields look exactly the same though, so it’s pretty odd the import failed. I’d hoped to just use SQLite Manager to just copy the old tags tables into the new database, but the image ids were sadly different. All my image names are unique, which meant I could run a query to match up the old and new image ids using the image names as a key, then replace the old ids in the copied-over ImageTags table with the matching new image ids. Complicated, but it worked…

Avatar photo

By isaac

I like cats. he/him