[TikiWiki-commits] [Git][tikiwiki/tiki][29.x] [BP][FIX] Database update: reduce index prefix length.
"Boss Ibrahim Mussa Gregoire \(@bim-g\) via TikiWiki-cvs" <[email protected]>
| Newsgroups | gmane.comp.cms.tiki.cvs |
|---|---|
| Message-ID | <69301a165495a_2a319af70516ac@gitlab-sidekiq-low-urgency-cpu-bound-v2-6986bd8b9d-fschg.mail> |
Boss Ibrahim Mussa Gregoire pushed to branch 29.x at Tiki Wiki CMS Groupware / Tiki Commits: 29e57e4a by Boss Ibrahim Mussa Gregoire at 2025-12-03T11:59:53+01:00 [BP][FIX] Database update: reduce index prefix length. --- * [FIX] Database update: reduce index prefix length. See merge request tikiwiki/tiki!9172 - - - - - 2 changed files: - db/tiki.sql - + installer/schema/20251128_reduce_tiki_comments_index_prefix_lenght_tiki.sql Changes: ===================================== db/tiki.sql ===================================== @@ -724,14 +724,14 @@ CREATE TABLE `tiki_comments` ( `approved` char(1) NOT NULL default 'y', `locked` char(1) NOT NULL default 'n', PRIMARY KEY (`threadId`), - UNIQUE KEY `no_repeats` (`parentId`, `userName`(40), `title`(43), `commentDate`, `message_id`(40), `in_reply_to`(40)), + UNIQUE KEY `no_repeats` (`parentId`, `userName`(20), `title`(30), `commentDate`, `message_id`(30), `in_reply_to`(30)), KEY `title` (`title`(191)), KEY `data` (`data`(191)), KEY `hits` (hits), KEY `tc_pi` (`parentId`), KEY `objectType` (object(160), `objectType`), KEY `commentDate` (`commentDate`), - KEY `threaded` (message_id(89), in_reply_to(88), `parentId`), + KEY `threaded` (message_id(40), in_reply_to(40), `parentId`), KEY `idx_slvn_commentDate` (`commentDate`) ) ENGINE=MyISAM AUTO_INCREMENT=1 ; ===================================== installer/schema/20251128_reduce_tiki_comments_index_prefix_lenght_tiki.sql ===================================== @@ -0,0 +1,4 @@ +ALTER TABLE `tiki_comments` DROP INDEX `threaded`; +ALTER TABLE `tiki_comments` ADD KEY `threaded` (`message_id`(40),`in_reply_to`(40),`parentId`); +ALTER TABLE tiki_comments DROP INDEX no_repeats; +ALTER TABLE tiki_comments ADD UNIQUE KEY no_repeats ( parentId, userName(20), title(30), commentDate, message_id(30), in_reply_to(30)); \ No newline at end of file View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/29e57e4a1fa2f252c6bee3e1dadeeca949334f97 -- View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/29e57e4a1fa2f252c6bee3e1dadeeca949334f97 You're receiving this email because of your account on gitlab.com. _______________________________________________ TikiWiki-cvs mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs