Summary: | Migration cannot drop or create FaceMatrices table [patch] | ||
---|---|---|---|
Product: | [Applications] digikam | Reporter: | meku <kde.bugs> |
Component: | Database-Mysql | Assignee: | Digikam Developers <digikam-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | caulier.gilles, metzpinguin |
Priority: | NOR | ||
Version First Reported In: | 7.2.0 | ||
Target Milestone: | --- | ||
Platform: | Appimage | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 7.3.0 | |
Sentry Crash Report: |
Description
meku
2021-04-07 08:57:44 UTC
I suspect the DROP TABLE is failing due to a foreign key linking to the FaceMatrices table. Additionally the CREATE TABLE FaceMatrices statement will not run due to missing field escaping: This line: CONSTRAINT FaceEmbedding_Identities FOREIGN KEY (identity) REFERENCES Identities (id) ON DELETE CASCADE ON UPDATE CASCADE) Needs to escape the `identity` field: CONSTRAINT FaceEmbedding_Identities FOREIGN KEY (`identity`) REFERENCES Identities (id) ON DELETE CASCADE ON UPDATE CASCADE) That cannot be the cause, because "identity" is not a reserved keyword in MySQL. I'm taking a closer look tonight. Maik (In reply to Maik Qualmann from comment #2) > That cannot be the cause, because "identity" is not a reserved keyword in > MySQL. I'm taking a closer look tonight. > > Maik Yeah I think you are right, create statement should work. I must have been looking at the wrong SQL engine list of keywords. I think the cause is clear. We can deactivate the constraint check when deleting the old table. You have elements in your table whose id is not in the identities table. I'm adding it tonight. Maik Git commit 087024f261ed66279b7016f26e4f606f6b97f01b by Maik Qualmann. Committed on 07/04/2021 at 16:54. Pushed by mqualmann into branch 'master'. disable foreign key checks when drop the table M +3 -2 core/data/database/dbconfig.xml.cmake.in https://invent.kde.org/graphics/digikam/commit/087024f261ed66279b7016f26e4f606f6b97f01b New AppImage for testing is available. Has the problem been resolved? https://files.kde.org/digikam/ Maik (In reply to Maik Qualmann from comment #6) > New AppImage for testing is available. Has the problem been resolved? Appears to be resolved in digiKam-7.3.0-20210411T170959-x86-64.appimage Thanks. |