Created
July 7, 2016 08:59
-
-
Save magicdude4eva/34a11d67e816d45a0c37005a5adcd01c to your computer and use it in GitHub Desktop.
Kayako upgrade for MySQL versions less than 5.6.31 and 5.7.13 are broken due to a bug in MySQL migrating the tables - a workaround after the restore:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Creating a new table with full text index: | |
CREATE TABLE `swticketposts_new` ( | |
`ticketpostid` int(11) NOT NULL AUTO_INCREMENT, | |
`ticketid` int(11) NOT NULL DEFAULT '0', | |
`dateline` int(11) NOT NULL DEFAULT '0', | |
`userid` int(11) NOT NULL DEFAULT '0', | |
`fullname` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', | |
`email` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', | |
`emailto` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', | |
`subject` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', | |
`ipaddress` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0.0.0.0', | |
`hasattachments` smallint(6) NOT NULL DEFAULT '0', | |
`edited` smallint(6) NOT NULL DEFAULT '0', | |
`editedbystaffid` int(11) NOT NULL DEFAULT '0', | |
`editeddateline` int(11) NOT NULL DEFAULT '0', | |
`creator` smallint(6) NOT NULL DEFAULT '0', | |
`isthirdparty` smallint(6) NOT NULL DEFAULT '0', | |
`ishtml` smallint(6) NOT NULL DEFAULT '0', | |
`isemailed` smallint(6) NOT NULL DEFAULT '0', | |
`staffid` int(11) NOT NULL DEFAULT '0', | |
`contents` longtext COLLATE utf8_unicode_ci, | |
`contenthash` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', | |
`subjecthash` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', | |
`issurveycomment` smallint(6) NOT NULL DEFAULT '0', | |
`creationmode` smallint(6) NOT NULL DEFAULT '0', | |
`responsetime` int(11) NOT NULL DEFAULT '0', | |
`firstresponsetime` int(11) NOT NULL DEFAULT '0', | |
`isprivate` smallint(6) NOT NULL DEFAULT '0', | |
`slaresponsetime` int(11) NOT NULL DEFAULT '0', | |
PRIMARY KEY (`ticketpostid`), | |
KEY `ticketposts1` (`ticketid`,`staffid`), | |
KEY `ticketposts2` (`email`,`subjecthash`), | |
KEY `ticketposts3` (`creator`,`staffid`,`dateline`), | |
KEY `ticketposts4` (`responsetime`), | |
KEY `ticketposts5` (`firstresponsetime`), | |
fulltext key idxft_ticketposts(contents) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; | |
2. Copying contents from 'swticketposts': | |
insert into swticketposts_new select * from swticketposts; | |
3. Rename swtickrtposts: | |
rename table swticketposts to swticketposts_old; | |
4. Rename new table to swticketpsosts | |
rename table swticketposts_new to swticketposts; | |
5. Drop old table: | |
drop table swticketposts_old; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Donations are always welcome
🍺 Please support me: If the above helped you in any way, then follow me on Twitter or send me some coins:
Sign up to Cointracking which uses APIs to connect to all exchanges and helps you with tax. Use Binance Exchange to trade #altcoins. Join TradingView to get trend-reports. Sign up with Coinbase and instantly get $10 in BTC. I also accept old-school PayPal.
If you have no crypto, follow me at least on Twitter.