{"action":"created","comment":{"url":"https://api.github.com/repos/SuperuserLabs/thankful/pulls/comments/207971929","pull_request_review_id":143690593,"id":207971929,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNzk3MTkyOQ==","diff_hunk":"@@ -38,9 +38,54 @@ function dbinit() {\n         });\n       });\n     });\n+  /* Version 5 upgrade summary:\n+   * Drop tables activity and creator to allow better naming and integer primary key.\n+   * thanks: 'creator' key (which was the url of a creator) replaced by creator_id\n+   * donations: 'url' key (which was the url of a creator) replaced by creator_id\n+   * creators: 'url' becomes multi-valued\n+   */\n+  db.version(5)\n+    .stores({\n+      activity: null,\n+      activities: '++id, &url, title, duration, creator_id',\n+      creator: null,\n+      creators: '++id, *url, name, ignore',\n+      thanks: '++id, url, date, title, creator_id',\n+      donations: '++id, date, creator_id, weiAmount, usdAmount',\n+    })\n+    .upgrade(trans => {\n+      trans.activity","path":"src/lib/db.js","position":20,"original_position":20,"commit_id":"188022ee2e78c1d0bae09cd18bb28ae5310ca1cf","original_commit_id":"188022ee2e78c1d0bae09cd18bb28ae5310ca1cf","user":{"login":"ErikBjare","id":1405370,"node_id":"MDQ6VXNlcjE0MDUzNzA=","avatar_url":"https://avatars0.githubusercontent.com/u/1405370?v=4","gravatar_id":"","url":"https://api.github.com/users/ErikBjare","html_url":"https://github.com/ErikBjare","followers_url":"https://api.github.com/users/ErikBjare/followers","following_url":"https://api.github.com/users/ErikBjare/following{/other_user}","gists_url":"https://api.github.com/users/ErikBjare/gists{/gist_id}","starred_url":"https://api.github.com/users/ErikBjare/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ErikBjare/subscriptions","organizations_url":"https://api.github.com/users/ErikBjare/orgs","repos_url":"https://api.github.com/users/ErikBjare/repos","events_url":"https://api.github.com/users/ErikBjare/events{/privacy}","received_events_url":"https://api.github.com/users/ErikBjare/received_events","type":"User","site_admin":false},"body":"Doesn't this need to return a promise or something? Or will the transaction magically know when it and the upgrade is completed? ","created_at":"2018-08-06T17:34:58Z","updated_at":"2018-08-06T17:35:39Z","html_url":"https://github.com/SuperuserLabs/thankful/pull/158#discussion_r207971929","pull_request_url":"https://api.github.com/repos/SuperuserLabs/thankful/pulls/158","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/SuperuserLabs/thankful/pulls/comments/207971929"},"html":{"href":"https://github.com/SuperuserLabs/thankful/pull/158#discussion_r207971929"},"pull_request":{"href":"https://api.github.com/repos/SuperuserLabs/thankful/pulls/158"}}},"pull_request":{"url":"https://api.github.com/repos/SuperuserLabs/thankful/pulls/158","id":206060919,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA2MDYwOTE5","html_url":"https://github.com/SuperuserLabs/thankful/pull/158","diff_url":"https://github.com/SuperuserLabs/thankful/pull/158.diff","patch_url":"https://github.com/SuperuserLabs/thankful/pull/158.patch","issue_url":"https://api.github.com/repos/SuperuserLabs/thankful/issues/158","number":158,"state":"open","locked":false,"title":"Saner database schema","user":{"login":"ahnlabb","id":8665338,"node_id":"MDQ6VXNlcjg2NjUzMzg=","avatar_url":"https://avatars1.githubusercontent.com/u/8665338?v=4","gravatar_id":"","url":"https://api.github.com/users/ahnlabb","html_url":"https://github.com/ahnlabb","followers_url":"https://api.github.com/users/ahnlabb/followers","following_url":"https://api.github.com/users/ahnlabb/following{/other_user}","gists_url":"https://api.github.com/users/ahnlabb/gists{/gist_id}","starred_url":"https://api.github.com/users/ahnlabb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahnlabb/subscriptions","organizations_url":"https://api.github.com/users/ahnlabb/orgs","repos_url":"https://api.github.com/users/ahnlabb/repos","events_url":"https://api.github.com/users/ahnlabb/events{/privacy}","received_events_url":"https://api.github.com/users/ahnlabb/received_events","type":"User","site_admin":false},"body":"Fixes #79 ","created_at":"2018-08-03T15:14:47Z","updated_at":"2018-08-06T17:35:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"890b8add36cd39e079f03770c6a60c1801296db2","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/SuperuserLabs/thankful/pulls/158/commits","review_comments_url":"https://api.github.com/repos/SuperuserLabs/thankful/pulls/158/comments","review_comment_url":"https://api.github.com/repos/SuperuserLabs/thankful/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SuperuserLabs/thankful/issues/158/comments","statuses_url":"https://api.github.com/repos/SuperuserLabs/thankful/statuses/188022ee2e78c1d0bae09cd18bb28ae5310ca1cf","head":{"label":"SuperuserLabs:dev/db-sane","ref":"dev/db-sane","sha":"188022ee2e78c1d0bae09cd18bb28ae5310ca1cf","user":{"login":"SuperuserLabs","id":39593861,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5NTkzODYx","avatar_url":"https://avatars3.githubusercontent.com/u/39593861?v=4","gravatar_id":"","url":"https://api.github.com/users/SuperuserLabs","html_url":"https://github.com/SuperuserLabs","followers_url":"https://api.github.com/users/SuperuserLabs/followers","following_url":"https://api.github.com/users/SuperuserLabs/following{/other_user}","gists_url":"https://api.github.com/users/SuperuserLabs/gists{/gist_id}","starred_url":"https://api.github.com/users/SuperuserLabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SuperuserLabs/subscriptions","organizations_url":"https://api.github.com/users/SuperuserLabs/orgs","repos_url":"https://api.github.com/users/SuperuserLabs/repos","events_url":"https://api.github.com/users/SuperuserLabs/events{/privacy}","received_events_url":"https://api.github.com/users/SuperuserLabs/received_events","type":"Organization","site_admin":false},"repo":{"id":59409821,"node_id":"MDEwOlJlcG9zaXRvcnk1OTQwOTgyMQ==","name":"thankful","full_name":"SuperuserLabs/thankful","owner":{"login":"SuperuserLabs","id":39593861,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5NTkzODYx","avatar_url":"https://avatars3.githubusercontent.com/u/39593861?v=4","gravatar_id":"","url":"https://api.github.com/users/SuperuserLabs","html_url":"https://github.com/SuperuserLabs","followers_url":"https://api.github.com/users/SuperuserLabs/followers","following_url":"https://api.github.com/users/SuperuserLabs/following{/other_user}","gists_url":"https://api.github.com/users/SuperuserLabs/gists{/gist_id}","starred_url":"https://api.github.com/users/SuperuserLabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SuperuserLabs/subscriptions","organizations_url":"https://api.github.com/users/SuperuserLabs/orgs","repos_url":"https://api.github.com/users/SuperuserLabs/repos","events_url":"https://api.github.com/users/SuperuserLabs/events{/privacy}","received_events_url":"https://api.github.com/users/SuperuserLabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SuperuserLabs/thankful","description":"Reward creators semi-automatically according to your consumption patterns and preferences using cryptocurrency.","fork":false,"url":"https://api.github.com/repos/SuperuserLabs/thankful","forks_url":"https://api.github.com/repos/SuperuserLabs/thankful/forks","keys_url":"https://api.github.com/repos/SuperuserLabs/thankful/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SuperuserLabs/thankful/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SuperuserLabs/thankful/teams","hooks_url":"https://api.github.com/repos/SuperuserLabs/thankful/hooks","issue_events_url":"https://api.github.com/repos/SuperuserLabs/thankful/issues/events{/number}","events_url":"https://api.github.com/repos/SuperuserLabs/thankful/events","assignees_url":"https://api.github.com/repos/SuperuserLabs/thankful/assignees{/user}","branches_url":"https://api.github.com/repos/SuperuserLabs/thankful/branches{/branch}","tags_url":"https://api.github.com/repos/SuperuserLabs/thankful/tags","blobs_url":"https://api.github.com/repos/SuperuserLabs/thankful/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SuperuserLabs/thankful/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SuperuserLabs/thankful/git/refs{/sha}","trees_url":"https://api.github.com/repos/SuperuserLabs/thankful/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SuperuserLabs/thankful/statuses/{sha}","languages_url":"https://api.github.com/repos/SuperuserLabs/thankful/languages","stargazers_url":"https://api.github.com/repos/SuperuserLabs/thankful/stargazers","contributors_url":"https://api.github.com/repos/SuperuserLabs/thankful/contributors","subscribers_url":"https://api.github.com/repos/SuperuserLabs/thankful/subscribers","subscription_url":"https://api.github.com/repos/SuperuserLabs/thankful/subscription","commits_url":"https://api.github.com/repos/SuperuserLabs/thankful/commits{/sha}","git_commits_url":"https://api.github.com/repos/SuperuserLabs/thankful/git/commits{/sha}","comments_url":"https://api.github.com/repos/SuperuserLabs/thankful/comments{/number}","issue_comment_url":"https://api.github.com/repos/SuperuserLabs/thankful/issues/comments{/number}","contents_url":"https://api.github.com/repos/SuperuserLabs/thankful/contents/{+path}","compare_url":"https://api.github.com/repos/SuperuserLabs/thankful/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SuperuserLabs/thankful/merges","archive_url":"https://api.github.com/repos/SuperuserLabs/thankful/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SuperuserLabs/thankful/downloads","issues_url":"https://api.github.com/repos/SuperuserLabs/thankful/issues{/number}","pulls_url":"https://api.github.com/repos/SuperuserLabs/thankful/pulls{/number}","milestones_url":"https://api.github.com/repos/SuperuserLabs/thankful/milestones{/number}","notifications_url":"https://api.github.com/repos/SuperuserLabs/thankful/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SuperuserLabs/thankful/labels{/name}","releases_url":"https://api.github.com/repos/SuperuserLabs/thankful/releases{/id}","deployments_url":"https://api.github.com/repos/SuperuserLabs/thankful/deployments","created_at":"2016-05-22T11:56:52Z","updated_at":"2018-08-02T13:28:02Z","pushed_at":"2018-08-03T16:22:53Z","git_url":"git://github.com/SuperuserLabs/thankful.git","ssh_url":"git@github.com:SuperuserLabs/thankful.git","clone_url":"https://github.com/SuperuserLabs/thankful.git","svn_url":"https://github.com/SuperuserLabs/thankful","homepage":"https://getthankful.io/","size":2424,"stargazers_count":14,"watchers_count":14,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":47,"license":null,"forks":2,"open_issues":47,"watchers":14,"default_branch":"master"}},"base":{"label":"SuperuserLabs:master","ref":"master","sha":"7975a81e8b2611de095613680ee99798f67b2851","user":{"login":"SuperuserLabs","id":39593861,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5NTkzODYx","avatar_url":"https://avatars3.githubusercontent.com/u/39593861?v=4","gravatar_id":"","url":"https://api.github.com/users/SuperuserLabs","html_url":"https://github.com/SuperuserLabs","followers_url":"https://api.github.com/users/SuperuserLabs/followers","following_url":"https://api.github.com/users/SuperuserLabs/following{/other_user}","gists_url":"https://api.github.com/users/SuperuserLabs/gists{/gist_id}","starred_url":"https://api.github.com/users/SuperuserLabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SuperuserLabs/subscriptions","organizations_url":"https://api.github.com/users/SuperuserLabs/orgs","repos_url":"https://api.github.com/users/SuperuserLabs/repos","events_url":"https://api.github.com/users/SuperuserLabs/events{/privacy}","received_events_url":"https://api.github.com/users/SuperuserLabs/received_events","type":"Organization","site_admin":false},"repo":{"id":59409821,"node_id":"MDEwOlJlcG9zaXRvcnk1OTQwOTgyMQ==","name":"thankful","full_name":"SuperuserLabs/thankful","owner":{"login":"SuperuserLabs","id":39593861,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5NTkzODYx","avatar_url":"https://avatars3.githubusercontent.com/u/39593861?v=4","gravatar_id":"","url":"https://api.github.com/users/SuperuserLabs","html_url":"https://github.com/SuperuserLabs","followers_url":"https://api.github.com/users/SuperuserLabs/followers","following_url":"https://api.github.com/users/SuperuserLabs/following{/other_user}","gists_url":"https://api.github.com/users/SuperuserLabs/gists{/gist_id}","starred_url":"https://api.github.com/users/SuperuserLabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SuperuserLabs/subscriptions","organizations_url":"https://api.github.com/users/SuperuserLabs/orgs","repos_url":"https://api.github.com/users/SuperuserLabs/repos","events_url":"https://api.github.com/users/SuperuserLabs/events{/privacy}","received_events_url":"https://api.github.com/users/SuperuserLabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SuperuserLabs/thankful","description":"Reward creators semi-automatically according to your consumption patterns and preferences using cryptocurrency.","fork":false,"url":"https://api.github.com/repos/SuperuserLabs/thankful","forks_url":"https://api.github.com/repos/SuperuserLabs/thankful/forks","keys_url":"https://api.github.com/repos/SuperuserLabs/thankful/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SuperuserLabs/thankful/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SuperuserLabs/thankful/teams","hooks_url":"https://api.github.com/repos/SuperuserLabs/thankful/hooks","issue_events_url":"https://api.github.com/repos/SuperuserLabs/thankful/issues/events{/number}","events_url":"https://api.github.com/repos/SuperuserLabs/thankful/events","assignees_url":"https://api.github.com/repos/SuperuserLabs/thankful/assignees{/user}","branches_url":"https://api.github.com/repos/SuperuserLabs/thankful/branches{/branch}","tags_url":"https://api.github.com/repos/SuperuserLabs/thankful/tags","blobs_url":"https://api.github.com/repos/SuperuserLabs/thankful/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SuperuserLabs/thankful/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SuperuserLabs/thankful/git/refs{/sha}","trees_url":"https://api.github.com/repos/SuperuserLabs/thankful/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SuperuserLabs/thankful/statuses/{sha}","languages_url":"https://api.github.com/repos/SuperuserLabs/thankful/languages","stargazers_url":"https://api.github.com/repos/SuperuserLabs/thankful/stargazers","contributors_url":"https://api.github.com/repos/SuperuserLabs/thankful/contributors","subscribers_url":"https://api.github.com/repos/SuperuserLabs/thankful/subscribers","subscription_url":"https://api.github.com/repos/SuperuserLabs/thankful/subscription","commits_url":"https://api.github.com/repos/SuperuserLabs/thankful/commits{/sha}","git_commits_url":"https://api.github.com/repos/SuperuserLabs/thankful/git/commits{/sha}","comments_url":"https://api.github.com/repos/SuperuserLabs/thankful/comments{/number}","issue_comment_url":"https://api.github.com/repos/SuperuserLabs/thankful/issues/comments{/number}","contents_url":"https://api.github.com/repos/SuperuserLabs/thankful/contents/{+path}","compare_url":"https://api.github.com/repos/SuperuserLabs/thankful/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SuperuserLabs/thankful/merges","archive_url":"https://api.github.com/repos/SuperuserLabs/thankful/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SuperuserLabs/thankful/downloads","issues_url":"https://api.github.com/repos/SuperuserLabs/thankful/issues{/number}","pulls_url":"https://api.github.com/repos/SuperuserLabs/thankful/pulls{/number}","milestones_url":"https://api.github.com/repos/SuperuserLabs/thankful/milestones{/number}","notifications_url":"https://api.github.com/repos/SuperuserLabs/thankful/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SuperuserLabs/thankful/labels{/name}","releases_url":"https://api.github.com/repos/SuperuserLabs/thankful/releases{/id}","deployments_url":"https://api.github.com/repos/SuperuserLabs/thankful/deployments","created_at":"2016-05-22T11:56:52Z","updated_at":"2018-08-02T13:28:02Z","pushed_at":"2018-08-03T16:22:53Z","git_url":"git://github.com/SuperuserLabs/thankful.git","ssh_url":"git@github.com:SuperuserLabs/thankful.git","clone_url":"https://github.com/SuperuserLabs/thankful.git","svn_url":"https://github.com/SuperuserLabs/thankful","homepage":"https://getthankful.io/","size":2424,"stargazers_count":14,"watchers_count":14,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":47,"license":null,"forks":2,"open_issues":47,"watchers":14,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SuperuserLabs/thankful/pulls/158"},"html":{"href":"https://github.com/SuperuserLabs/thankful/pull/158"},"issue":{"href":"https://api.github.com/repos/SuperuserLabs/thankful/issues/158"},"comments":{"href":"https://api.github.com/repos/SuperuserLabs/thankful/issues/158/comments"},"review_comments":{"href":"https://api.github.com/repos/SuperuserLabs/thankful/pulls/158/comments"},"review_comment":{"href":"https://api.github.com/repos/SuperuserLabs/thankful/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SuperuserLabs/thankful/pulls/158/commits"},"statuses":{"href":"https://api.github.com/repos/SuperuserLabs/thankful/statuses/188022ee2e78c1d0bae09cd18bb28ae5310ca1cf"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"ErikBjare"}}