Bug 396944

Summary: Integrity constraint violation on Albums.icons when migrating from sqlite to mysql
Product: [Applications] digikam Reporter: Dav <davm6101>
Component: Database-MigrationAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 5.9.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 6.0.0
Sentry Crash Report:

Description Dav 2018-07-29 04:03:37 UTC
Dear all,

When migrating from sqlite to mysql, I got an unexpected error during the migration process:

Error while converting the database.
 Details: Cannot add or update a child row: a foreign key constraint fails (`digikam`.`Albums`, CONSTRAINT `Albums_Images` FOREIGN KEY (`icon`) REFERENCES `Images` (`id`) ON DELETE SET NULL ON UPDATE CASCADE)

I've been able to fix it when editing my sqlite database (setting null on each album image id) but it seems that there is a workaround on the image used as album cover.

Regards
Comment 1 Maik Qualmann 2018-07-29 07:57:55 UTC
Git commit e31e1298f6ebff6410b35bc50767f0fd50711cdf by Maik Qualmann.
Committed on 29/07/2018 at 07:56.
Pushed by mqualmann into branch 'master'.

fix the database migration if the album icon does not exist
FIXED-IN: 6.0.0

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

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