Skip to content

Instantly share code, notes, and snippets.

@magicdude4eva
Created July 7, 2016 08:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save magicdude4eva/34a11d67e816d45a0c37005a5adcd01c to your computer and use it in GitHub Desktop.
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:
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;
@magicdude4eva
Copy link
Author

magicdude4eva commented Jan 1, 2018

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:

(BTC)    36nBgsAhBBzkTvJMut851XVj47bUrdsmQx
(ETH)    0xE572b3B1187a3Ab77D72f7d6AeCd18DF26306cfC
(BAT)    0x48c65D6f768D92d4a23E4e9d25329E7De67c14d9
(LTC)    M8TNsiQWe591HTkDtLubZeftbejfPMcoUy
(Ripple) rw2ciyaNshpHe7bCHo4bRWq6pqqynnWKQg (Tag: 2478959347)
(XLM)    GDQP2KPQGKIHYJGXNUIYOMHARUARCA7DJT5FO2FFOOKY3B2WSQHG4W37 (Memo ID: 909493707)

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment