Login  Register

[digikam] [Bug 283323] MYSQL : a new label "_Digikam_root_tag_" is created every time

Posted by bugzilla_noreply on May 26, 2016; 1:42pm
URL: http://digikam.185.s1.nabble.com/Bug-283323-New-a-new-label-Digikam-root-tag-is-created-every-time-tp3871432p4684502.html

https://bugs.kde.org/show_bug.cgi?id=283323

--- Comment #71 from [hidden email] ---
(In reply to Richard Mortimer from comment #69)
> First step to resolve this has to be to add UNIQUE(name, pid) to the MySQL
> version of the Tags table (around line 1056 in dbconfig.xml.cmake).
>
> That will at least force MySQL to reject any attempts to add duplicates.
> Once that is done then it should be easier to find out why digikam is trying
> to add the duplicates in the first place.

Is this fine?

CREATE TABLE `Tags` (
    ->   `id` int(11) NOT NULL AUTO_INCREMENT,
    ->   `pid` int(11) DEFAULT NULL UNIQUE,
    ->   `name` varchar(100) CHARACTER SET utf8 NOT NULL UNIQUE,
    ->   `icon` int(11) DEFAULT NULL,
    ->   `iconkde` longtext CHARACTER SET utf8,
    ->   `lft` int(11) NOT NULL,
    ->   `rgt` int(11) NOT NULL,
    ->   PRIMARY KEY (`id`),
    ->   KEY `Tags_Images` (`icon`),
    ->   CONSTRAINT `Tags_Images` FOREIGN KEY (`icon`) REFERENCES `Images`
(`id`) ON DELETE SET NULL ON UPDATE CASCADE
    -> ) ENGINE=InnoDB AUTO_INCREMENT=40 DEFAULT CHARSET=utf8mb4;

For column 'name' I changed from TEXT to VARCHAR ('cause it gave error:
TEXT/BLOB column 'name' used in key specification without key length)

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel