Bug 325654

Summary: MIGRATION : tags are not shown afterwards, because pid has wrong value
Product: [Applications] digikam Reporter: Thomas Bleher <ThomasBleher>
Component: Database-MigrationAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: caulier.gilles, msp, swatilodha27
Priority: NOR    
Version: 3.3.0   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In: 5.8.0

Description Thomas Bleher 2013-10-05 08:33:36 UTC
I recently migrated my digikam database from MySQL to SQLite. After the migration, digikam didn't show any tags at all. Investigations showed that for all tags that had no parent, the pid field in the Tags table was set to -1. After manually setting the pid to 0 (via "update Tags set pid=0 where pid=-1"), the tags showed correctly again. The pid was set to 0 in the original MySQL database, so something incorrectly converts the value during migration.

Reproducible: Always
Comment 1 caulier.gilles 2014-08-08 08:35:22 UTC
*** Bug 301075 has been marked as a duplicate of this bug. ***
Comment 2 caulier.gilles 2016-07-06 20:26:50 UTC
This file still valid using last digiKam 5.0.0 ?

Gilles Caulier
Comment 3 Thomas Bleher 2016-07-10 20:27:50 UTC
Sorry, at the moment I don't have time to update to digiKam 5.0.0 and set up appropriate tests (still on digiKam 4.9.0).
Comment 4 caulier.gilles 2016-07-10 20:47:58 UTC
And with 4.9.0, the problem is reproducible ?

Gilles Caulier
Comment 5 caulier.gilles 2016-07-23 08:41:20 UTC
Swati,

This file must be checked with migration tool when Mysql DB must be converted to Sqlite.

Gilles Caulier
Comment 6 Maik Qualmann 2017-11-25 22:04:54 UTC
Git commit 9a17c743ea9a41c1ef050b08517343813ef6a9f4 by Maik Qualmann.
Committed on 25/11/2017 at 22:02.
Pushed by mqualmann into branch 'master'.

update DB to v9 and fix migration from SQLite to MySQL
Related: bug 378838, bug 369083, bug 350574
FIXED-IN: 5.8.0

M  +5    -1    NEWS
M  +129  -97   data/database/dbconfig.xml.cmake.in
M  +1    -1    data/database/mysql-global.conf
M  +1    -20   libs/database/coredb/coredbcopymanager.cpp
M  +5    -2    libs/database/coredb/coredbschemaupdater.cpp

https://commits.kde.org/digikam/9a17c743ea9a41c1ef050b08517343813ef6a9f4