(mysql)从digikam 4. *迁移到5. *时的数据库迁移难度

我有 !用digikam和我的debian稳定/测试组合管理的十年标记照片最近升级为digikam 5. *.

我现在面临的问题是,在尝试升级到更新的数据库方案(v.8)时,持有爱的劳动的(mysql)数据库似乎会出现问题.

当启动digikam v5.*指向4.* – 使用的数据库后端时,我得到以下内容:

digikam.dbengine: Loading SQL code from config file "/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  7
digikam.coredb: Core database: makeUpdates  7  to  8
digikam.dbengine: Failure executing query:
 ""
Error messages: "QMYSQL: Unable to execute query" "Can't DROP 'Albums_AlbumRoots'; check that column/key exists" 1091 2
Bound values:  ()
digikam.dbengine: Error while executing DBAction [ "UpdateSchemaFromV7ToV8" ] Statement [ "ALTER TABLE Albums\n                                        DROP FOREIGN KEY Albums_AlbumRoots;" ]
digikam.coredb: Core database: schema update to V 8 failed!
digikam.coredb: Core database: cannot process schema initialization

当显式尝试使用5中包含的db迁移工具时.*我最终得到了下图中表示的错误:
(mysql)从digikam 4. *迁移到5. *时的数据库迁移难度

任何人都可以帮助decyphering这里发生了什么,分别如何解决它?

荷兰Joh

解决方法:

由于我的旧数据库中存在一些不一致,我遇到了同样的问题.修复后(主要是删除一些死引用)进行升级.我似乎还有另一个问题,但可能与db无关.

这将显示您的问题(除了根标签外都应为空):

取自https://bugs.kde.org/show_bug.cgi?id=355831#c73

select * from Images where album not in (select Albums.id from Albums);
select id, icon from Albums where icon != 0 and icon not in (select id from Images);
select * from Albums where Albums.albumRoot not in (select AlbumRoots.id from AlbumRoots);
select * from ImageHaarMatrix where imageid not in (select id from Images);
select * from ImageInformation where imageid not in (select id from Images);
select * from ImageMetadata where imageid not in (select id from Images);
select * from VideoMetadata where imageid not in (select id from Images);
select * from ImagePositions where imageid not in (select id from Images);
select * from ImageComments where imageid not in (select id from Images);
select * from ImageCopyright where imageid not in (select id from Images);
select * from Tags where pid != 0 and pid not in (select id from Tags);
select id, icon from Tags where icon != 0 and icon not in (select id from Images);
select * from ImageTags where tagid not in (select id from Tags);
select * from ImageTags where imageid not in (select id from Images);
select * from ImageProperties where imageid not in (select id from Images);
select * from ImageHistory where imageid not in (select id from Images);
select * from ImageRelations where subject not in (select id from Images);
select * from ImageRelations where object not in (select id from Images);
select * from ImageTagProperties where imageid not in (select id from Images);
select * from TagProperties where tagid not in (select id from Tags);
select * from ImageTagProperties where tagid not in (select id from Tags);

还有一个修复脚本可以在源头找到.

而我刚才了解到,5.2.0已于两天前发布!

上一篇:最小化安装的centos 6.5补安kde桌面系统


下一篇:CentOS 7 安装以及配置桌面环境