Bug 396944 - Integrity constraint violation on Albums.icons when migrating from sqlite to mysql
Summary: Integrity constraint violation on Albums.icons when migrating from sqlite to ...
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Database-Migration (show other bugs)
Version: 5.9.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-07-29 04:03 UTC by Dav
Modified: 2018-07-29 07:57 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 6.0.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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