[digikam] [Bug 369083] New: database migration sets wrong parent ids for tags
via KDE Bugzilla
bugzilla_noreply at kde.org
Mon Sep 19 23:07:37 BST 2016
https://bugs.kde.org/show_bug.cgi?id=369083
Bug ID: 369083
Summary: database migration sets wrong parent ids for tags
Product: digikam
Version: 5.1.0
Platform: Fedora RPMs
OS: Linux
Status: UNCONFIRMED
Severity: minor
Priority: NOR
Component: Database-Migration
Assignee: digikam-devel at kde.org
Reporter: beaaeecffmiqwryxcmbw2ta2cukc4 at protected32.unixadm.org
After a database migration from ... 5? to 8 all tags have vanished.
The migration tools sets the parent ids of those tags to "-1" instead of "0".
Reproducible: Always
Steps to Reproduce:
1. migrate database from old_dbname to new_dbname (mysql external to mysql
external)
2. enter configuration
3. set new_dbname as current database
Actual Results:
tags are neither shown in tag manager nor the images are tagged.
Expected Results:
tags are available in tag manager and shown on images.
I've been using digikam for ages now without ever upgrading my database. I had
to do the following steps to even convert the database successfully:
create table deleteme (id int(11) not null);
insert into deleteme (id) select id from Images where album not in (select id
from Albums);
delete from Images where id in (select id from deleteme);
drop table deleteme;
delete from ImageTags where imageid not in (select id from Images);
delete from ImageHaarMatrix where imageid not in (select id from Images);
delete from ImageInformation where imageid not in (select id from Images);
delete from ImageMetadata where imageid not in (select id from Images);
delete from VideoMetadata where imageid not in (select id from Images);
delete from ImagePositions where imageid not in (select id from Images);
delete from ImageComments where imageid not in (select id from Images);
delete from ImageCopyright where imageid not in (select id from Images);
delete from ImageProperties where imageid not in (select id from Images);
delete from ImageHistory where imageid not in (select id from Images);
delete from ImageTagProperties where imageid not in (select id from Images);
delete from ImageRelations where subject not in (select id from Images) or
object not in (select id from Images);
delete from ImageTags where tagid not in (select id from Tags);
and after running the migration tool, I got my tags back again using:
update Tags set pid = 0 where pid = -1 and name not like '_Digikam_%';
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the Digikam-devel
mailing list