https://bugs.kde.org/show_bug.cgi?id=366445
Bug ID: 366445 Summary: MySQL Schema upgrade from V7 to V8 failes Product: digikam Version: 5.1.0 Platform: Compiled Sources OS: Linux Status: UNCONFIRMED Severity: normal Priority: NOR Component: Database-Mysql Assignee: digikam-de...@kde.org Reporter: i...@beware.dropbear.id.au Created attachment 100460 --> https://bugs.kde.org/attachment.cgi?id=100460&action=edit Modified dbconfig.xml After compiling and installing 5.1.0, running it throws up an error, "Failed to update the database schema from version 7 to version 8." I have been able to make this work with some changes to dbconfig.xml and also some manual tweaking to the database. The issues with dbconfig.xml are: you can't use (for example) "DROP KEY albumRoot" to delete a foreign key constraint, you have to use "DROP FOREIGN KEY Albums_AlbumRoots" for example; some tables already have a foreign key but there is no DROP FOREIGN KEY (or DROP KEY) statement; there is a typo in the code to update MIN(lft) and MAX(rgt) values for the Tags table; and finally for MySQL prior to 5.6 (I've got 5.5) you need to do the DROP FOREIGN KEY in a separate statement to adding the new foreign key constraint. In my case, the database was a bit of a mess with (for example) ImageInformation rows for Images which no longer exist, so the foreign key constraint is violated. I fixed this by hand, but it would be possible to make a helper script which could find these violations and give the user the option to fix them by deleting the offending entries. -- You are receiving this mail because: You are watching all bug changes.