UpdateSchemaFromV7ToV8 fails

Mikael Kujanpää mahead80 at nic.fi
Sat Aug 27 10:09:06 BST 2016

I was happy to notice that KDE Neon had upgraded the Digikam to the 
latest 5.1 version from previous 4.x.

I have my picture collection on nfs share, and metadata is stored on 
MySql server. However, the schema upgrade didn't succeed. This is the 
debug data that is printed to the console:

mkujanpa at earth:~$ digikam
digikam.general: AlbumWatch use QFileSystemWatcher
QFileSystemWatcher::removePaths: list is empty
digikam.general: Database Parameters:
    Type:                     "QMYSQL"
    DB Core Name:             "digikamdb"
    DB Thumbs Name:           "digikamthumbdb"
    DB Face Name:             "digikamfacedb"
    Connect Options:          ""
    Host Name:                "neptunus"
    Host port:                3306
    Internal Server:          false
    Internal Server Path:     ""
    Internal Server Serv Cmd: ""
    Internal Server Init Cmd: ""
    Username:                 "digikam"
    Password:                 "XXXXXXXXX"

digikam.dbengine: Loading SQL code from config file 
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  7
digikam.coredb: Core database: makeUpdates  7  to  8
digikam.dbengine: Failure executing query:
Error messages: "QMYSQL: Kyselyn suorittaminen epäonnistui" "Specified 
key was too long; max key length is 767 bytes" 1071 2
Bound values:  ()
digikam.dbengine: Error while executing DBAction [ 
"UpdateSchemaFromV7ToV8" ] Statement [ "ALTER TABLE Albums\n             
                            ADD CONSTRAINT Albums_AlbumRoots FOREIGN KEY 
CASCADE,\n                                        ADD UNIQUE (albumRoot, 
relativePath(255)),\n                                        ENGINE 
InnoDB;" ]
digikam.coredb: Core database: schema update to V 8 failed!
digikam.coredb: Core database: cannot process schema initialization

I didn't have any table for faces before, so I added the name 
"digikamfacedb" on initial parameter dialog. The localized error message 
is translated about as "QMYSQL: Failed to execute the query".

Do you have any tips how I could proceed? I'm happy to test any 
modifications to /usr/share/digikam/database/dbconfig.xml if you have 
any suggestions what could be wrong there (or on my db).


More information about the Digikam-users mailing list