gpt4 book ai didi

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

转载 作者:可可西里 更新时间:2023-11-01 07:21:54 26 4
gpt4 key购买 nike

我有!用 digikam 和我的 debian 稳定/测试组合管理了十年值(value)的标记照片最近升级到 digikam 5.*。

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

当启动 digikam v5.* 指向 4.*-used 数据库后端时,我得到以下信息:

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.* 中的数据库迁移工具时,我最终遇到下图所示的错误: enter image description here

任何人都可以帮助破译这里发生的事情,以及如何修复它吗?

约翰

最佳答案

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

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

取自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 已经在两天前发布了!

关于mysql - (mysql) 从 digikam 4.* 迁移到 5.* 时数据库迁移困难,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39678123/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com