Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/image-processing/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
(mysql)从digikam 4.*迁移到5时数据库迁移困难*_Mysql_Image Processing_Kde - Fatal编程技术网

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

(mysql)从digikam 4.*迁移到5时数据库迁移困难*,mysql,image-processing,kde,Mysql,Image Processing,Kde,我有!用digikam和我的debian stable/testing mix管理的十年标签照片最近升级到digikam 5。* 我现在面临的问题是,当试图升级到较新的数据库scheme v.8时,持有“爱的劳动”的MySQL数据库似乎出现了问题 当启动digikam v5.*指向4.*使用的数据库后端时,我得到以下信息: digikam.dbengine: Loading SQL code from config file "/usr/share/digikam/database/dbconf

我有!用digikam和我的debian stable/testing mix管理的十年标签照片最近升级到digikam 5。*

我现在面临的问题是,当试图升级到较新的数据库scheme 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迁移工具时,我最终遇到下图所示的错误:

有人能帮我解决这件事吗?怎么解决


Joh

由于旧数据库中的一些不一致性,我也遇到了同样的问题。在修复了那些主要删除一些死引用的错误之后,进行了一次升级。我似乎还有另一个问题,但可能与db无关

这将显示您的问题,除根标记外,所有问题都应为空:

取自

在源代码中还可以找到修复脚本


我刚刚得知,5.2.0已经在两天前发布了

从Debian哮喘病到Debian伸展运动都很困难,希望这能帮助一些人

这对我很有用:

确保digiKam没有运行

将旧配置文件从~/.kde/share/config/digikamrc复制到~/.config/digikamrc

使用某些sqlite编辑器(例如sqlitebrowser)打开digikam4.db数据库文件

编辑表根并修复标识符列中的斜杠,即将%2F的所有实例替换为/

保存数据库

交叉手指是可选的,但推荐使用

启动digiKam


祝你好运

谢谢你指出这一点。在我的例子中,您的查询给出:select*from ImageInformation,其中imageid不在select id from Images中;18行从ImageMetadata中选择*,其中imageid不在从图像中选择id中;18行从ImageComments中选择*,其中imageid不在从图像中选择id中;21行从pid!=0和pid不在select id from标记中;1行select*from ImageTags,其中tagid不在select id from Tags中;8行select*from ImageTags,其中imageid不在select id from Images中;111排。我要删除那些行吗?十年的爱的劳动似乎只是一点点损失,所以我会删除它。当然,我假设你在一个非常安全的地方有数据库当前状态的备份。。。我还将查看缺陷报告的附件和-在更新atempts和手动更新脚本之前修复db。重新阅读您的注释并删除所有行,但不包括代码生成的带有根标记的行,以及逐步执行缺陷提供的模式v.7到v.8升级代码,解决了我的问题。非常感谢你。。。。问题解决了,但刚刚迎来下一个问题。。。现在我有了所有图像的元和拇指信息,包括那些驻留在网络驱动器上的图像。。。但是,网络驻留图像的路径似乎已被截取,我无法访问它们。。。当尝试在那里添加目录/相册时,我被告知文件:///不存在。。。你也遇到过吗?与此同时,我在digikam邮件列表上查询过,结果发现数据库中的路径编码错误,这可能是从kde转换到QtaPI的结果。更改字符本身路径中的html编码斜杠/后,一切都开始工作。
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);
UPDATE AlbumRoots
SET identifier = replace(identifier, '%2F', '/')
WHERE identifier LIKE '%%%2F%';