{"action":"created","issue":{"url":"https://api.github.com/repos/e107inc/e107/issues/3178","repository_url":"https://api.github.com/repos/e107inc/e107","labels_url":"https://api.github.com/repos/e107inc/e107/issues/3178/labels{/name}","comments_url":"https://api.github.com/repos/e107inc/e107/issues/3178/comments","events_url":"https://api.github.com/repos/e107inc/e107/issues/3178/events","html_url":"https://github.com/e107inc/e107/issues/3178","id":330002449,"node_id":"MDU6SXNzdWUzMzAwMDI0NDk=","number":3178,"title":"plugin sql changed - weird behaviour while update","user":{"login":"Jimmi08","id":5429548,"node_id":"MDQ6VXNlcjU0Mjk1NDg=","avatar_url":"https://avatars2.githubusercontent.com/u/5429548?v=4","gravatar_id":"","url":"https://api.github.com/users/Jimmi08","html_url":"https://github.com/Jimmi08","followers_url":"https://api.github.com/users/Jimmi08/followers","following_url":"https://api.github.com/users/Jimmi08/following{/other_user}","gists_url":"https://api.github.com/users/Jimmi08/gists{/gist_id}","starred_url":"https://api.github.com/users/Jimmi08/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jimmi08/subscriptions","organizations_url":"https://api.github.com/users/Jimmi08/orgs","repos_url":"https://api.github.com/users/Jimmi08/repos","events_url":"https://api.github.com/users/Jimmi08/events{/privacy}","received_events_url":"https://api.github.com/users/Jimmi08/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-06-06T19:32:00Z","updated_at":"2018-06-06T20:54:20Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"Installed plugin with this SQL (example)\r\n\r\n```\r\nCREATE TABLE canonical (\r\n  `can_id` int(10) unsigned NOT NULL AUTO_INCREMENT,\r\n  `can_table` varchar(50) NOT NULL DEFAULT '',\r\n  `can_pid` int(10) unsigned NOT NULL DEFAULT '0',\r\n  `can_title` varchar(250) NOT NULL DEFAULT '',\r\n  `can_url` varchar(250) NOT NULL DEFAULT '',\r\n   PRIMARY KEY  (`can_id`),\r\n   KEY `can_pid` (`can_pid`)\r\n) ENGINE=MyISAM;\r\n```\r\n\r\nThere is wrong index `KEY `can_pid` (`can_pid`)`, it needs to be changed to:      \r\n`UNIQUE KEY `can_unq` (`can_table`,`can_pid`) `\r\n(similar like in reference plugin)\r\n\r\nI got correct Update info in admin area. After update it said Plugin was updated but info about update was still there.\r\n\r\nEach click on Update causes new index in database this way:\r\n\r\n![image](https://user-images.githubusercontent.com/5429548/41060759-de8585ce-69d0-11e8-9235-20deab89c5dc.png)\r\n\r\nPHP 5.5\r\nWhat is correct syntax for something like this?"},"comment":{"url":"https://api.github.com/repos/e107inc/e107/issues/comments/395210397","html_url":"https://github.com/e107inc/e107/issues/3178#issuecomment-395210397","issue_url":"https://api.github.com/repos/e107inc/e107/issues/3178","id":395210397,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NTIxMDM5Nw==","user":{"login":"Jimmi08","id":5429548,"node_id":"MDQ6VXNlcjU0Mjk1NDg=","avatar_url":"https://avatars2.githubusercontent.com/u/5429548?v=4","gravatar_id":"","url":"https://api.github.com/users/Jimmi08","html_url":"https://github.com/Jimmi08","followers_url":"https://api.github.com/users/Jimmi08/followers","following_url":"https://api.github.com/users/Jimmi08/following{/other_user}","gists_url":"https://api.github.com/users/Jimmi08/gists{/gist_id}","starred_url":"https://api.github.com/users/Jimmi08/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jimmi08/subscriptions","organizations_url":"https://api.github.com/users/Jimmi08/orgs","repos_url":"https://api.github.com/users/Jimmi08/repos","events_url":"https://api.github.com/users/Jimmi08/events{/privacy}","received_events_url":"https://api.github.com/users/Jimmi08/received_events","type":"User","site_admin":false},"created_at":"2018-06-06T20:54:19Z","updated_at":"2018-06-06T20:54:19Z","author_association":"CONTRIBUTOR","body":"@SimSync I removed first one form database (I mean this:   KEY `can_pid` (`can_pid`))  then I run update.  I didn't help.\r\nI am not able to write this in _setup.php , There is not enough examples for me.    But I posted it to canonical plugin, @CaMer0n should be write this _setup file. \r\n"}}
{"actor":{"display_login":"Jimmi08"}}