[digikam] [Bug 373605] Failed to update database schema from version 7 to version 8

Kusi bugzilla_noreply at kde.org
Mon Dec 19 00:18:07 GMT 2016


https://bugs.kde.org/show_bug.cgi?id=373605

Kusi <kusi at forum.titlis.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kusi at forum.titlis.org

--- Comment #4 from Kusi <kusi at forum.titlis.org> ---
Since I reported https://bugs.kde.org/show_bug.cgi?id=372312, I can give you
some more comments:

Over the years, my database started containing invalid entries, like yours.
Your Albums table has entries pointing to an image which doesn't exist. DK4 and
earlier did not prevent these illegal combinations, so the error is not
immediately noticed.

Since DK5, these violations are prohibited by foreign key constraints, which is
a good thing. Whenever you change to a more strict scheme, you need to clean up
the mess before. I had to manually delete all illegal rows (and there were
many) in my db before upgrading to DK5.

If you hit the same issue as I had, then you need to get your hands dirty by
fixing your db either with the "mysql" or "dbeaver" tool. You can detect FK
violations with the attached sql script:

1) edit the first line and change to your digikam db name
2) run mysql -u<your user> -p<your pass> < check-fk-violations.sql

The script returns illegal entries in your db. Then you need to investigate and
figure out if it's ok for you to delete the violating rows. 

best, Kusi

PS: Maik, seems like I have FK violations again even with your added
constraints. My db was clean a month ago. At a first glance, the violating rows
involve deleted images (in DK5). Seems like something is still wrong. I need to
investigate more.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Digikam-devel mailing list