首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >(Mysql)从digikam 4.*迁移到5.*的数据库迁移困难

(Mysql)从digikam 4.*迁移到5.*的数据库迁移困难
EN

Stack Overflow用户
提问于 2016-09-24 15:42:17
回答 2查看 1.9K关注 0票数 4

我看过了!十年的标签照片管理与数字和我的debian稳定/测试组合最近升级为数码5。

我现在面临的问题是,(Mysql)数据库在试图升级到较新的数据库方案时,似乎会产生一些问题(第8节)。

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

代码语言:javascript
复制
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迁移工具时,我将得到以下图像中表示的错误:

有人能帮我弄清楚这是怎么回事吗,分别如何解决?

Joh

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2016-09-26 15:13:16

我也有同样的问题,因为我的旧数据库中的一些不一致。在修复了这些(主要是删除一些死引用)之后,进行了升级。我似乎还有另外一个问题,但可能与数据库无关。

这将显示问题(除根标记外,所有问题都应该是空的):

取自bug.cgi?id=355831#c73

代码语言:javascript
复制
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是两天前发布的!

票数 4
EN

Stack Overflow用户

发布于 2017-06-20 12:58:33

(很难从Debian迁移到Debian扩展,希望这能帮助到某人.)

这对我起了作用:

  • 确保digiKam没有运行
  • 将旧配置文件从~/.kde/share/config/digikamrc复制到~/.config/digikamrc
  • 使用sqlite编辑器打开digikam4.db数据库文件(例如sqlitebrowser)
  • 编辑表AlbumRoots并修正标识符列中的斜杠(即用/替换%2F的所有实例) 更新AlbumRoots SET标识符=替换(标识符,'%2F','/'),其中标识符为‘%%2F%’;
  • 保存数据库
  • 祈祷你的手指(可选,但推荐)
  • 启动digiKam

祝好运!

票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/39678123

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档