Bug 433183

Summary: Migrate from "MySQL Server" database corrupts face/people metadata.
Product: [Applications] digikam Reporter: Elias Gabrielsson <elias.gabrielsson>
Component: Database-MigrationAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 7.2.0   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed In: 7.2.0
Attachments: Wrong tag shown

Description Elias Gabrielsson 2021-02-18 16:59:00 UTC
SUMMARY:
Migration from "MySQL Server" to "SQLite" corrupts faces / people metadata.
- The face tag is stored as "IIM Application 2" -> "Keywords" in the IPTC metadata tab. 
- All people are removed in people list. 
- The images will also be marked with "Scanned for Faces".


STEPS TO REPRODUCE
1. Setup MySQL Server and connect digikam.
2. Add image, tag face in image.
3. Scan databases for faces.
4. Add another image (will not be tagged "Scanned for Faces".
5. Open Migration tool, migrate "MySQL Server" to "SQLite".
6. Change database to internal "SQLite".
7. Restart Digikam to flush cache.
8. Open image and observe result.

OBSERVED RESULT


EXPECTED RESULT:
- Face and people tags should persist between migrations.  

SOFTWARE/OS VERSIONS
Windows: Windows 10
MariaDB 10.2, Digikam 7.2.0-RC
Comment 1 Elias Gabrielsson 2021-02-18 17:01:48 UTC
Created attachment 135859 [details]
Wrong tag shown
Comment 2 Elias Gabrielsson 2021-02-18 17:17:19 UTC
I have tested the following cases which both produces a corrupted migration:
"MySQL Server" -> "SQLite"
"MySQL Server" -> "MySQL Server"
Comment 3 Maik Qualmann 2021-02-18 21:50:22 UTC
Git commit 739835829940dac3c2b86c8f15b6dc3d6eaa41e2 by Maik Qualmann.
Committed on 18/02/2021 at 21:49.
Pushed by mqualmann into branch 'master'.

fix sql query to copy TagsProperties table
FIXED-IN: 7.2.0

M  +2    -1    NEWS
M  +1    -2    core/data/database/dbconfig.xml.cmake.in

https://invent.kde.org/graphics/digikam/commit/739835829940dac3c2b86c8f15b6dc3d6eaa41e2