Bug 388329 - UpdateSchemaFromV8ToV9 fails with Cannot delete rows from table which is parent in a foreign key constraint
Summary: UpdateSchemaFromV8ToV9 fails with Cannot delete rows from table which is pare...
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Database-Schema (show other bugs)
Version: 5.8.0
Platform: Appimage Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-29 16:32 UTC by Jyrki Soini
Modified: 2017-12-29 17:11 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jyrki Soini 2017-12-29 16:32:13 UTC
~> digikam-5.8.0-20171229T043903-x86-64.appimage 
-- digiKam AppImage Bundle
-- Use 'help' as CLI argument to know all available options
digikam.widgets: Breeze icons ressource file found
digikam.general: AlbumWatch use QFileSystemWatcher
digikam.general: Database Parameters:
   Type:                     "QMYSQL"
   DB Core Name:             "digikam"
   DB Thumbs Name:           "digikam"
   DB Face Name:             "digikam"
   Connect Options:          "UNIX_SOCKET=/run/mysql/mysql.sock"
   Host Name:                "localhost"
   Host port:                3306
   Internal Server:          false
   Internal Server Path:     ""
   Internal Server Serv Cmd: ""
   Internal Server Init Cmd: ""
   Username:                 "digikam"
   Password:                 "XXXXXXXXXXXXXXXXXXXX"

digikam.dbengine: Loading SQL code from config file "/tmp/.mount_KbhoQa/usr/share/digikam/database/dbconfig.xml"
digikam.dbengine: Checking XML version ID => expected:  3  found:  3
digikam.coredb: Core database: running schema update
digikam.coredb: Core database: have a structure version  8
digikam.coredb: Core database: makeUpdates  8  to  9
digikam.dbengine: Failure executing query:
 "" 
Error messages: "QMYSQL: Unable to execute query" "Cannot delete rows from table which is parent in a foreign key constraint 'Images_Albums' of table 'Images'" 1834 2 
Bound values:  ()
digikam.dbengine: Error while executing DBAction [ "UpdateSchemaFromV8ToV9" ] Statement [ "ALTER TABLE Albums MODIFY COLUMN relativePath LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;" ]
digikam.coredb: Core database: schema update to V 9 failed!
digikam.coredb: Core database: cannot process schema initialization
KMemoryInfo: Platform identified :  "LINUX"
KMemoryInfo: TotalRam:  16765005824
digikam.general: Allowing a cache size of 200 MB
QThreadStorage: Thread 0x7f39fbe64600 exited after QThreadStorage 11 destroyed
Comment 1 Maik Qualmann 2017-12-29 17:11:56 UTC
Git commit dd2afd796792632f4d487791f4c1c22ee6ea87b2 by Maik Qualmann.
Committed on 29/12/2017 at 17:10.
Pushed by mqualmann into branch 'master'.

disable for update v8 to v9 temporarily the foreign key check
FIXED-IN: 5.8.0

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

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