Bug 385269

Summary: [DK 5.7] database migration sqlite -> mysql external server fails
Product: [Applications] digikam Reporter: maderios <leoutation>
Component: Database-MigrationAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: jo.hoppe, leoutation
Priority: NOR    
Version First Reported In: 5.7.0   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 5.8.0
Sentry Crash Report:

Description maderios 2017-10-01 17:10:05 UTC
Conditions: DK-5.7 Archlinux x86_64 Mariadb-10.1.28-1
DK works fine with sqlite.
Message with database migration tool sqlite -> mysql external server:
'Details: Cannot add or update a child row: a foreign key constraint fails (`mydk`.`ImageInformation`, CONSTRAINT `ImageInformation_Images` FOREIGN KEY (`imageid`) REFERENCES `Images` (`id`) ON DELETE CASCADE ON UPDATE CASCADE)'
Comment 1 Joachim 2017-11-06 11:33:29 UTC
Getting the same fail as Marcel.
conditions: DK-5.7 Windows 10 64, MariaDB-10.
Migration works fine until approx. 50 % is done. Than Migration stops with the same massage. Only the tables are different. 

I tried to repair my SQLite db (dump and rebuild). No success.
Comment 2 Maik Qualmann 2017-11-07 21:06:32 UTC
Git commit e6f18d4b6522c2d63773c0999c62f99be84e7f79 by Maik Qualmann.
Committed on 07/11/2017 at 21:05.
Pushed by mqualmann into branch 'master'.

add check in SQLite if image ID exists in the Images table
FIXED-IN: 5.8.0

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

https://commits.kde.org/digikam/e6f18d4b6522c2d63773c0999c62f99be84e7f79