{"action":"created","issue":{"url":"https://api.github.com/repos/tog22/eahub/issues/28","labels_url":"https://api.github.com/repos/tog22/eahub/issues/28/labels{/name}","comments_url":"https://api.github.com/repos/tog22/eahub/issues/28/comments","events_url":"https://api.github.com/repos/tog22/eahub/issues/28/events","html_url":"https://github.com/tog22/eahub/issues/28","id":106377213,"number":28,"title":"Merge users with identical emails & then require emails to be unique","user":{"login":"tog22","id":888877,"avatar_url":"https://avatars.githubusercontent.com/u/888877?v=3","gravatar_id":"","url":"https://api.github.com/users/tog22","html_url":"https://github.com/tog22","followers_url":"https://api.github.com/users/tog22/followers","following_url":"https://api.github.com/users/tog22/following{/other_user}","gists_url":"https://api.github.com/users/tog22/gists{/gist_id}","starred_url":"https://api.github.com/users/tog22/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tog22/subscriptions","organizations_url":"https://api.github.com/users/tog22/orgs","repos_url":"https://api.github.com/users/tog22/repos","events_url":"https://api.github.com/users/tog22/events{/privacy}","received_events_url":"https://api.github.com/users/tog22/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"tog22","id":888877,"avatar_url":"https://avatars.githubusercontent.com/u/888877?v=3","gravatar_id":"","url":"https://api.github.com/users/tog22","html_url":"https://github.com/tog22","followers_url":"https://api.github.com/users/tog22/followers","following_url":"https://api.github.com/users/tog22/following{/other_user}","gists_url":"https://api.github.com/users/tog22/gists{/gist_id}","starred_url":"https://api.github.com/users/tog22/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tog22/subscriptions","organizations_url":"https://api.github.com/users/tog22/orgs","repos_url":"https://api.github.com/users/tog22/repos","events_url":"https://api.github.com/users/tog22/events{/privacy}","received_events_url":"https://api.github.com/users/tog22/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2015-09-14T16:18:44Z","updated_at":"2015-09-15T22:31:06Z","closed_at":"2015-09-15T22:31:06Z","body":"Get duplicates using `SELECT mail, count(*) FROM users GROUP BY mail HAVING count(*) > 1;`\r\n\r\nTake best guess at account they use. Merge in fields you can add from the other account (if there's a clash and it's ambiguous which version to use, leave the field as is). Delete the other account. Then when done this for them all, do:\r\n\r\n```\r\nALTER TABLE users\r\nDROP INDEX email;\r\n\r\nALTER TABLE users\r\nADD UNIQUE INDEX email;\r\n```"},"comment":{"url":"https://api.github.com/repos/tog22/eahub/issues/comments/140565367","html_url":"https://github.com/tog22/eahub/issues/28#issuecomment-140565367","issue_url":"https://api.github.com/repos/tog22/eahub/issues/28","id":140565367,"user":{"login":"tog22","id":888877,"avatar_url":"https://avatars.githubusercontent.com/u/888877?v=3","gravatar_id":"","url":"https://api.github.com/users/tog22","html_url":"https://github.com/tog22","followers_url":"https://api.github.com/users/tog22/followers","following_url":"https://api.github.com/users/tog22/following{/other_user}","gists_url":"https://api.github.com/users/tog22/gists{/gist_id}","starred_url":"https://api.github.com/users/tog22/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tog22/subscriptions","organizations_url":"https://api.github.com/users/tog22/orgs","repos_url":"https://api.github.com/users/tog22/repos","events_url":"https://api.github.com/users/tog22/events{/privacy}","received_events_url":"https://api.github.com/users/tog22/received_events","type":"User","site_admin":false},"created_at":"2015-09-15T22:31:06Z","updated_at":"2015-09-15T22:31:06Z","body":"Done.\r\n"}}