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

Richard Mortimer via KDE Bugzilla bugzilla_noreply at kde.org
Thu May 26 15:41:48 BST 2016


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

--- Comment #72 from Richard Mortimer <richm+kde at oldelvet.org.uk> ---
I've tended to keep LONGTEXT and use a length on the index. That way a long tag
name will not totally break things - but will likely cause unexpected
behaviour.

Try

CREATE TABLE IF NOT EXISTS Tags
                            (id INTEGER PRIMARY KEY NOT NULL AUTO_INCREMENT,
                            pid INTEGER,
                            name LONGTEXT CHARACTER SET utf8 NOT NULL,
                            icon INTEGER,
                            iconkde LONGTEXT CHARACTER SET utf8,
                            lft INT NOT NULL,
                            rgt INT NOT NULL,
                            UNIQUE(pid, name(100)),
                            CONSTRAINT Tags_Images FOREIGN KEY (icon)
REFERENCES Images (id) ON DELETE SET NULL ON UPDATE CASCADE
                            ) ENGINE InnoDB;

-- 
You are receiving this mail because:
You are the assignee for the bug.



More information about the Digikam-devel mailing list