UpdateSchemaFromV7ToV8 fails

Mikael Kujanpää mahead80 at nic.fi
Mon Aug 29 19:08:20 BST 2016


Gilles Caulier kirjoitti 29.08.2016 00:39:
> See this file which have been typically fixed with 5.1.0 :
> https://bugs.kde.org/show_bug.cgi?id=366445 [1]

Thank you lot for your suggestion. I was under impression that those 
changes were already included to the version 5.1.0, but apparently they 
weren't. However, those modifications didn't make any difference. I 
replaced my /usr/share/digikam/database/dbconfig.xml with the attached 
version and this is what I got when running digikam executable:

"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\t\t    ADD 
CONSTRAINT Albums_AlbumRoots FOREIGN KEY (albumRoot) REFERENCES 
AlbumRoots (id) ON DELETE CASCADE ON UPDATE CASCADE,\n\t\t    ADD UNIQUE 
(albumRoot, relativePath(255)),\n\t\t    ENGINE InnoDB;" ]
digikam.coredb: Core database: schema update to V 8 failed!
digikam.coredb: Core database: cannot process schema initialization

What I googled about "Specified key was too long" error, it has 
something to do with UTF-8 collated database fields. Could this kind of 
error happen because I have some entries with long filepaths (although 
even the longest should be only about ~50 chars total), or is this 
purely related to the db schema? But I guess this is db content related, 
because otherwise this issue should happen to everyone upgrading their 
MySql db.

-- 
Mikki



More information about the Digikam-users mailing list