{"action":"created","issue":{"url":"https://api.github.com/repos/Runalyze/Runalyze/issues/1582","labels_url":"https://api.github.com/repos/Runalyze/Runalyze/issues/1582/labels{/name}","comments_url":"https://api.github.com/repos/Runalyze/Runalyze/issues/1582/comments","events_url":"https://api.github.com/repos/Runalyze/Runalyze/issues/1582/events","html_url":"https://github.com/Runalyze/Runalyze/issues/1582","id":116443740,"number":1582,"title":"upgrade to 2.2 / single-user install of 2.1 / duplicates in table","user":{"login":"KarolTx","id":8162529,"avatar_url":"https://avatars.githubusercontent.com/u/8162529?v=3","gravatar_id":"","url":"https://api.github.com/users/KarolTx","html_url":"https://github.com/KarolTx","followers_url":"https://api.github.com/users/KarolTx/followers","following_url":"https://api.github.com/users/KarolTx/following{/other_user}","gists_url":"https://api.github.com/users/KarolTx/gists{/gist_id}","starred_url":"https://api.github.com/users/KarolTx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KarolTx/subscriptions","organizations_url":"https://api.github.com/users/KarolTx/orgs","repos_url":"https://api.github.com/users/KarolTx/repos","events_url":"https://api.github.com/users/KarolTx/events{/privacy}","received_events_url":"https://api.github.com/users/KarolTx/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Runalyze/Runalyze/labels/help%20wanted","name":"help wanted","color":"159818"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-11-11T23:25:44Z","updated_at":"2015-11-12T13:35:20Z","closed_at":null,"body":"Hi,\r\n\r\nI retried the steps in the upgrade guide several (at least 5) times (everytime from a fresh copy of the backup) and everytime I got duplicates in sports types, plugins, panels.\r\nIn 2.1 I had few activity types renamed (just lower case) and after I created a new account, the sports and activity types were reinserted along with new conf-entries for panels and plugins.\r\n\r\nI tried to copy just one row from the account table and start from the backup: as didn't execute step 2., only inserted the copied row into the account table. However this didn't end well either, f.e.:\r\n\"Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`runalyze`.`runalyze_plugin_conf`, CONSTRAINT `runalyze_plugin_conf_ibfk_1` FOREIGN KEY (`pluginid`) REFERENCES `runalyze_plugin` (`id`) ON DELETE CASCADE ON UPDATE CASCADE)' in /opt/lampp/htdocs/runalyze/inc/system/class.PDOforRunalyze.php:267 Stack trace: #0 /opt/lampp/htdocs/runalyze/inc/system/class.PDOforRunalyze.php(267): PDO->query('INSERT INTO `ru...') #1 /opt/lampp/htdocs/runalyze/inc/system/class.PDOforRunalyze.php(167): PDOforRunalyze->query('INSERT INTO `ru...') #2 /opt/lampp/htdocs/runalyze/inc/plugin/config/class.PluginConfiguration.php(113): PDOforRunalyze->insert('plugin_conf', Array, Array) #3 /opt/lampp/htdocs/runalyze/inc/plugin/config/class.PluginConfiguration.php(92): PluginConfiguration->insertValueToDatabase(Object(PluginConfigurationValueBool)) #4 /opt/lampp/htdocs/runalyze/inc/plugin/config/class.PluginConfiguration.php in /opt/lampp/htdocs/runalyze/inc/system/class.PDOforRunalyze.php on line 267\"\r\n\r\nAny ideas?"},"comment":{"url":"https://api.github.com/repos/Runalyze/Runalyze/issues/comments/156103741","html_url":"https://github.com/Runalyze/Runalyze/issues/1582#issuecomment-156103741","issue_url":"https://api.github.com/repos/Runalyze/Runalyze/issues/1582","id":156103741,"user":{"login":"mipapo","id":2135076,"avatar_url":"https://avatars.githubusercontent.com/u/2135076?v=3","gravatar_id":"","url":"https://api.github.com/users/mipapo","html_url":"https://github.com/mipapo","followers_url":"https://api.github.com/users/mipapo/followers","following_url":"https://api.github.com/users/mipapo/following{/other_user}","gists_url":"https://api.github.com/users/mipapo/gists{/gist_id}","starred_url":"https://api.github.com/users/mipapo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mipapo/subscriptions","organizations_url":"https://api.github.com/users/mipapo/orgs","repos_url":"https://api.github.com/users/mipapo/repos","events_url":"https://api.github.com/users/mipapo/events{/privacy}","received_events_url":"https://api.github.com/users/mipapo/received_events","type":"User","site_admin":false},"created_at":"2015-11-12T13:35:20Z","updated_at":"2015-11-12T13:35:20Z","body":"Well but like I said: please try the changed switch-accountid-to1.sql I posted in my last entry. I think we missed the double entries because users have to make the new account"}}