Duplicate albums when migrating digikam data

Gurvan Huiban gugs.ml at free.fr
Thu Feb 9 06:56:43 GMT 2017


Hello,

My message did not have a lot of success (or did not arrive on the list in the 
right moment).

For the record, I soolved part of my problem.

Investigating the db file with sqlite3 and sqlitebrowser, I observed that the 
content of the columns of type TEXT were strange: It appeared normal when 
displaying all the rows, but I could not use the text contained to filter the 
row (Sorry for the inaccurate vocabulary, I am not a database expert)

SELECT * FROM ALBUMS WHERE RelativePath LIKE "%2016%";
did not return any row, while it should, as
SELECT * FROM ALBUMS;
showed rows containing 2016 in the RelativePath

I believe this put digikam in a state where it had to rescan the entire 
collection and could not match the paths.

To fix this, I wrote a small script that dumped one by one all the tables in a 
.csv file, deleted all the table's rows, and then re-importing the rows in the 
table. And it worked! ...

... almost completely: the list of tags is still empty, even though now the 
TEXT columns in the Tag related tables now contain "normal" text.

I do not intend to spend hours on the issue (the investigation above already 
took me a few); but if anyone has a clue of

- Why the content of the TEXT column were "strange"? Can it be an encoding 
issue or something like that? (reminder: to export the database file, I used 
Digikam 4.14 export tool to extract the data from an internal MySQL server to 
a SQLite DB)

- Why did I lost my Tags?

I would be grateful.

Thank you.
Best regards
Gurvan

Le lundi 23 janvier 2017, 21:15:31 CET Gurvan Huiban a écrit :
> Hello list,
> 
> I am trying to migrate my Digikam data from one computer to another, but I
> always end up with a duplicate list of albums (See attached screenshot).
> 
> More precisely:
> - I have Digikam 4.14 installed on my old computer (Debian), with the photos
> on an external HDD and the data in an internal MySQL database.
> - I exported the data into a SQLite database using Digikam migration tool. I
> copy this file on my new computer
> - On my new computer (Debian, with Digikam 5.3.0), I tried to create "an
> empy collection" with the Digikam wizard, and then to replace the
> digikam4.db with the one I got from my old computer. I also tried to
> configure digikam with the location of my photos, and then import the
> digikam4.db from my old computer into the new one, but in each case, I end
> with the same thing: All the albums are duplicated. All my tags are also
> lost.
> 
> I had a quick look inside the digikam4.db with sqlitebrowser, but I could
> not detect any issue.
> 
> What do I do wrong, and how could I successfully migrate my albums?
> 
> Thank you.
> 
> Best regards,
> Gurvan





More information about the Digikam-users mailing list