{"action":"created","comment":{"url":"https://api.github.com/repos/gratipay/gratipay.com/pulls/comments/50154706","id":50154706,"diff_hunk":"@@ -416,11 +417,11 @@ def add_email(self, email, resend_threshold='3 minutes'):\n             nonce = self.db.one(\"\"\"\n                 UPDATE emails\n                    SET verification_start=%s\n-                 WHERE participant=%s\n+                 WHERE participant_id=%s\n                    AND address=%s\n                    AND verified IS NULL\n              RETURNING nonce\n-            \"\"\", (verification_start, self.username, email))\n+            \"\"\", (verification_start, self.id, email))\n             if not nonce:\n                 return self.add_email(email)\n ","path":"gratipay/models/participant.py","position":38,"original_position":38,"commit_id":"1c73db582c35dc57076bc9e7bdb98540634cc0ef","original_commit_id":"1c73db582c35dc57076bc9e7bdb98540634cc0ef","user":{"login":"aandis","id":4983347,"avatar_url":"https://avatars.githubusercontent.com/u/4983347?v=3","gravatar_id":"","url":"https://api.github.com/users/aandis","html_url":"https://github.com/aandis","followers_url":"https://api.github.com/users/aandis/followers","following_url":"https://api.github.com/users/aandis/following{/other_user}","gists_url":"https://api.github.com/users/aandis/gists{/gist_id}","starred_url":"https://api.github.com/users/aandis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aandis/subscriptions","organizations_url":"https://api.github.com/users/aandis/orgs","repos_url":"https://api.github.com/users/aandis/repos","events_url":"https://api.github.com/users/aandis/events{/privacy}","received_events_url":"https://api.github.com/users/aandis/received_events","type":"User","site_admin":false},"body":"> Aha. So this is ready to go, eh?\r\n\r\nYes! :dancer: ","created_at":"2016-01-19T18:44:56Z","updated_at":"2016-01-19T18:44:56Z","html_url":"https://github.com/gratipay/gratipay.com/pull/3896#discussion_r50154706","pull_request_url":"https://api.github.com/repos/gratipay/gratipay.com/pulls/3896","_links":{"self":{"href":"https://api.github.com/repos/gratipay/gratipay.com/pulls/comments/50154706"},"html":{"href":"https://github.com/gratipay/gratipay.com/pull/3896#discussion_r50154706"},"pull_request":{"href":"https://api.github.com/repos/gratipay/gratipay.com/pulls/3896"}}},"pull_request":{"url":"https://api.github.com/repos/gratipay/gratipay.com/pulls/3896","id":56463161,"html_url":"https://github.com/gratipay/gratipay.com/pull/3896","diff_url":"https://github.com/gratipay/gratipay.com/pull/3896.diff","patch_url":"https://github.com/gratipay/gratipay.com/pull/3896.patch","issue_url":"https://api.github.com/repos/gratipay/gratipay.com/issues/3896","number":3896,"state":"open","locked":false,"title":"Change emails foreign key - 2","user":{"login":"aandis","id":4983347,"avatar_url":"https://avatars.githubusercontent.com/u/4983347?v=3","gravatar_id":"","url":"https://api.github.com/users/aandis","html_url":"https://github.com/aandis","followers_url":"https://api.github.com/users/aandis/followers","following_url":"https://api.github.com/users/aandis/following{/other_user}","gists_url":"https://api.github.com/users/aandis/gists{/gist_id}","starred_url":"https://api.github.com/users/aandis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aandis/subscriptions","organizations_url":"https://api.github.com/users/aandis/orgs","repos_url":"https://api.github.com/users/aandis/repos","events_url":"https://api.github.com/users/aandis/events{/privacy}","received_events_url":"https://api.github.com/users/aandis/received_events","type":"User","site_admin":false},"body":"This is the next step after #3893. Pr includes a migration to fill the new `emails.participant_id` column with existing data and modifies email reads to then read from the new column instead of `emails.participant`.","created_at":"2016-01-19T13:05:31Z","updated_at":"2016-01-19T18:44:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a5f1b24a67a6fb709ad90e73e8713d8a26721eda","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/gratipay/gratipay.com/pulls/3896/commits","review_comments_url":"https://api.github.com/repos/gratipay/gratipay.com/pulls/3896/comments","review_comment_url":"https://api.github.com/repos/gratipay/gratipay.com/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gratipay/gratipay.com/issues/3896/comments","statuses_url":"https://api.github.com/repos/gratipay/gratipay.com/statuses/1c73db582c35dc57076bc9e7bdb98540634cc0ef","head":{"label":"gratipay:change-emails-foreign-key-2","ref":"change-emails-foreign-key-2","sha":"1c73db582c35dc57076bc9e7bdb98540634cc0ef","user":{"login":"gratipay","id":1744073,"avatar_url":"https://avatars.githubusercontent.com/u/1744073?v=3","gravatar_id":"","url":"https://api.github.com/users/gratipay","html_url":"https://github.com/gratipay","followers_url":"https://api.github.com/users/gratipay/followers","following_url":"https://api.github.com/users/gratipay/following{/other_user}","gists_url":"https://api.github.com/users/gratipay/gists{/gist_id}","starred_url":"https://api.github.com/users/gratipay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gratipay/subscriptions","organizations_url":"https://api.github.com/users/gratipay/orgs","repos_url":"https://api.github.com/users/gratipay/repos","events_url":"https://api.github.com/users/gratipay/events{/privacy}","received_events_url":"https://api.github.com/users/gratipay/received_events","type":"Organization","site_admin":false},"repo":{"id":4521463,"name":"gratipay.com","full_name":"gratipay/gratipay.com","owner":{"login":"gratipay","id":1744073,"avatar_url":"https://avatars.githubusercontent.com/u/1744073?v=3","gravatar_id":"","url":"https://api.github.com/users/gratipay","html_url":"https://github.com/gratipay","followers_url":"https://api.github.com/users/gratipay/followers","following_url":"https://api.github.com/users/gratipay/following{/other_user}","gists_url":"https://api.github.com/users/gratipay/gists{/gist_id}","starred_url":"https://api.github.com/users/gratipay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gratipay/subscriptions","organizations_url":"https://api.github.com/users/gratipay/orgs","repos_url":"https://api.github.com/users/gratipay/repos","events_url":"https://api.github.com/users/gratipay/events{/privacy}","received_events_url":"https://api.github.com/users/gratipay/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gratipay/gratipay.com","description":"Payments and Payroll for Open Work","fork":false,"url":"https://api.github.com/repos/gratipay/gratipay.com","forks_url":"https://api.github.com/repos/gratipay/gratipay.com/forks","keys_url":"https://api.github.com/repos/gratipay/gratipay.com/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gratipay/gratipay.com/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gratipay/gratipay.com/teams","hooks_url":"https://api.github.com/repos/gratipay/gratipay.com/hooks","issue_events_url":"https://api.github.com/repos/gratipay/gratipay.com/issues/events{/number}","events_url":"https://api.github.com/repos/gratipay/gratipay.com/events","assignees_url":"https://api.github.com/repos/gratipay/gratipay.com/assignees{/user}","branches_url":"https://api.github.com/repos/gratipay/gratipay.com/branches{/branch}","tags_url":"https://api.github.com/repos/gratipay/gratipay.com/tags","blobs_url":"https://api.github.com/repos/gratipay/gratipay.com/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gratipay/gratipay.com/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gratipay/gratipay.com/git/refs{/sha}","trees_url":"https://api.github.com/repos/gratipay/gratipay.com/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gratipay/gratipay.com/statuses/{sha}","languages_url":"https://api.github.com/repos/gratipay/gratipay.com/languages","stargazers_url":"https://api.github.com/repos/gratipay/gratipay.com/stargazers","contributors_url":"https://api.github.com/repos/gratipay/gratipay.com/contributors","subscribers_url":"https://api.github.com/repos/gratipay/gratipay.com/subscribers","subscription_url":"https://api.github.com/repos/gratipay/gratipay.com/subscription","commits_url":"https://api.github.com/repos/gratipay/gratipay.com/commits{/sha}","git_commits_url":"https://api.github.com/repos/gratipay/gratipay.com/git/commits{/sha}","comments_url":"https://api.github.com/repos/gratipay/gratipay.com/comments{/number}","issue_comment_url":"https://api.github.com/repos/gratipay/gratipay.com/issues/comments{/number}","contents_url":"https://api.github.com/repos/gratipay/gratipay.com/contents/{+path}","compare_url":"https://api.github.com/repos/gratipay/gratipay.com/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gratipay/gratipay.com/merges","archive_url":"https://api.github.com/repos/gratipay/gratipay.com/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gratipay/gratipay.com/downloads","issues_url":"https://api.github.com/repos/gratipay/gratipay.com/issues{/number}","pulls_url":"https://api.github.com/repos/gratipay/gratipay.com/pulls{/number}","milestones_url":"https://api.github.com/repos/gratipay/gratipay.com/milestones{/number}","notifications_url":"https://api.github.com/repos/gratipay/gratipay.com/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gratipay/gratipay.com/labels{/name}","releases_url":"https://api.github.com/repos/gratipay/gratipay.com/releases{/id}","created_at":"2012-06-01T16:01:02Z","updated_at":"2016-01-16T17:39:48Z","pushed_at":"2016-01-19T13:05:31Z","git_url":"git://github.com/gratipay/gratipay.com.git","ssh_url":"git@github.com:gratipay/gratipay.com.git","clone_url":"https://github.com/gratipay/gratipay.com.git","svn_url":"https://github.com/gratipay/gratipay.com","homepage":"https://gratipay.com/","size":67532,"stargazers_count":910,"watchers_count":910,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":280,"mirror_url":null,"open_issues_count":473,"forks":280,"open_issues":473,"watchers":910,"default_branch":"master"}},"base":{"label":"gratipay:master","ref":"master","sha":"7f95f92e4866d435e148d644f7dfcc9c2cff7284","user":{"login":"gratipay","id":1744073,"avatar_url":"https://avatars.githubusercontent.com/u/1744073?v=3","gravatar_id":"","url":"https://api.github.com/users/gratipay","html_url":"https://github.com/gratipay","followers_url":"https://api.github.com/users/gratipay/followers","following_url":"https://api.github.com/users/gratipay/following{/other_user}","gists_url":"https://api.github.com/users/gratipay/gists{/gist_id}","starred_url":"https://api.github.com/users/gratipay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gratipay/subscriptions","organizations_url":"https://api.github.com/users/gratipay/orgs","repos_url":"https://api.github.com/users/gratipay/repos","events_url":"https://api.github.com/users/gratipay/events{/privacy}","received_events_url":"https://api.github.com/users/gratipay/received_events","type":"Organization","site_admin":false},"repo":{"id":4521463,"name":"gratipay.com","full_name":"gratipay/gratipay.com","owner":{"login":"gratipay","id":1744073,"avatar_url":"https://avatars.githubusercontent.com/u/1744073?v=3","gravatar_id":"","url":"https://api.github.com/users/gratipay","html_url":"https://github.com/gratipay","followers_url":"https://api.github.com/users/gratipay/followers","following_url":"https://api.github.com/users/gratipay/following{/other_user}","gists_url":"https://api.github.com/users/gratipay/gists{/gist_id}","starred_url":"https://api.github.com/users/gratipay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gratipay/subscriptions","organizations_url":"https://api.github.com/users/gratipay/orgs","repos_url":"https://api.github.com/users/gratipay/repos","events_url":"https://api.github.com/users/gratipay/events{/privacy}","received_events_url":"https://api.github.com/users/gratipay/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gratipay/gratipay.com","description":"Payments and Payroll for Open Work","fork":false,"url":"https://api.github.com/repos/gratipay/gratipay.com","forks_url":"https://api.github.com/repos/gratipay/gratipay.com/forks","keys_url":"https://api.github.com/repos/gratipay/gratipay.com/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gratipay/gratipay.com/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gratipay/gratipay.com/teams","hooks_url":"https://api.github.com/repos/gratipay/gratipay.com/hooks","issue_events_url":"https://api.github.com/repos/gratipay/gratipay.com/issues/events{/number}","events_url":"https://api.github.com/repos/gratipay/gratipay.com/events","assignees_url":"https://api.github.com/repos/gratipay/gratipay.com/assignees{/user}","branches_url":"https://api.github.com/repos/gratipay/gratipay.com/branches{/branch}","tags_url":"https://api.github.com/repos/gratipay/gratipay.com/tags","blobs_url":"https://api.github.com/repos/gratipay/gratipay.com/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gratipay/gratipay.com/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gratipay/gratipay.com/git/refs{/sha}","trees_url":"https://api.github.com/repos/gratipay/gratipay.com/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gratipay/gratipay.com/statuses/{sha}","languages_url":"https://api.github.com/repos/gratipay/gratipay.com/languages","stargazers_url":"https://api.github.com/repos/gratipay/gratipay.com/stargazers","contributors_url":"https://api.github.com/repos/gratipay/gratipay.com/contributors","subscribers_url":"https://api.github.com/repos/gratipay/gratipay.com/subscribers","subscription_url":"https://api.github.com/repos/gratipay/gratipay.com/subscription","commits_url":"https://api.github.com/repos/gratipay/gratipay.com/commits{/sha}","git_commits_url":"https://api.github.com/repos/gratipay/gratipay.com/git/commits{/sha}","comments_url":"https://api.github.com/repos/gratipay/gratipay.com/comments{/number}","issue_comment_url":"https://api.github.com/repos/gratipay/gratipay.com/issues/comments{/number}","contents_url":"https://api.github.com/repos/gratipay/gratipay.com/contents/{+path}","compare_url":"https://api.github.com/repos/gratipay/gratipay.com/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gratipay/gratipay.com/merges","archive_url":"https://api.github.com/repos/gratipay/gratipay.com/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gratipay/gratipay.com/downloads","issues_url":"https://api.github.com/repos/gratipay/gratipay.com/issues{/number}","pulls_url":"https://api.github.com/repos/gratipay/gratipay.com/pulls{/number}","milestones_url":"https://api.github.com/repos/gratipay/gratipay.com/milestones{/number}","notifications_url":"https://api.github.com/repos/gratipay/gratipay.com/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gratipay/gratipay.com/labels{/name}","releases_url":"https://api.github.com/repos/gratipay/gratipay.com/releases{/id}","created_at":"2012-06-01T16:01:02Z","updated_at":"2016-01-16T17:39:48Z","pushed_at":"2016-01-19T13:05:31Z","git_url":"git://github.com/gratipay/gratipay.com.git","ssh_url":"git@github.com:gratipay/gratipay.com.git","clone_url":"https://github.com/gratipay/gratipay.com.git","svn_url":"https://github.com/gratipay/gratipay.com","homepage":"https://gratipay.com/","size":67532,"stargazers_count":910,"watchers_count":910,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":280,"mirror_url":null,"open_issues_count":473,"forks":280,"open_issues":473,"watchers":910,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gratipay/gratipay.com/pulls/3896"},"html":{"href":"https://github.com/gratipay/gratipay.com/pull/3896"},"issue":{"href":"https://api.github.com/repos/gratipay/gratipay.com/issues/3896"},"comments":{"href":"https://api.github.com/repos/gratipay/gratipay.com/issues/3896/comments"},"review_comments":{"href":"https://api.github.com/repos/gratipay/gratipay.com/pulls/3896/comments"},"review_comment":{"href":"https://api.github.com/repos/gratipay/gratipay.com/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gratipay/gratipay.com/pulls/3896/commits"},"statuses":{"href":"https://api.github.com/repos/gratipay/gratipay.com/statuses/1c73db582c35dc57076bc9e7bdb98540634cc0ef"}}}}