I literally just did this to switch between docker on Unraid to Windows and vice versa. Assuming the pics are at a single location of either pc, nas, or whatever.
Create a backup of the original files first.
Did you create a backup of the original files?
The files i needed to modify were digikam4.db and thumbnails-digikam.db.
Setup:
docker: mapped to /pics/
windows: mapped to U:/
U: should be mapped exactly the same as /pics/
/pics/folder1/etc/ → U:/folder1/etc/
/pics/folder2/etc/ → U:/folder2/etc/
digikam4.db
AlbumRoots - identifier, casesensitivity
UPDATE AlbumRoots
SET identifier = REPLACE(identifier, 'ORIGINAL_FILE_PATH', 'NEW_FILE_PATH')
EXAMPLE: REPLACE(identifier, 'volumeid:?path=/pics/', 'volumeid:?path=U:/')
as far as i know casesensitivity changes from 2 to 1. (docker to windows)
thumbnails-digikam.db
CustomIdentifiers, FilePaths
Update CustomIdentifiers
SET identifier = REPLACE(identifier, 'detail:///pics/', 'detail:///U:/')
Update FilePaths
SET path= REPLACE(path, '/pics/', 'U:/')
make sure that there are 3 /// in customidentifiers.
I’m sure someone smarter than me can make a better sql command that’s a bit safer but that worked for me.