{"action":"created","comment":{"url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/pulls/comments/220231758","pull_request_review_id":158592136,"id":220231758,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMDIzMTc1OA==","diff_hunk":"@@ -56,6 +57,24 @@ def as_list(cls):\n \n     action = models.CharField(max_length=6, choices=ActionTypes.choices)\n \n+    weather = models.CharField(max_length=50, null=True, blank=True)","path":"app/data/models.py","position":18,"original_position":18,"commit_id":"ee173f235b790bcaf0dc3c598a4db96da0d1d686","original_commit_id":"ee173f235b790bcaf0dc3c598a4db96da0d1d686","user":{"login":"shreshthkhilani","id":3959096,"node_id":"MDQ6VXNlcjM5NTkwOTY=","avatar_url":"https://avatars0.githubusercontent.com/u/3959096?v=4","gravatar_id":"","url":"https://api.github.com/users/shreshthkhilani","html_url":"https://github.com/shreshthkhilani","followers_url":"https://api.github.com/users/shreshthkhilani/followers","following_url":"https://api.github.com/users/shreshthkhilani/following{/other_user}","gists_url":"https://api.github.com/users/shreshthkhilani/gists{/gist_id}","starred_url":"https://api.github.com/users/shreshthkhilani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shreshthkhilani/subscriptions","organizations_url":"https://api.github.com/users/shreshthkhilani/orgs","repos_url":"https://api.github.com/users/shreshthkhilani/repos","events_url":"https://api.github.com/users/shreshthkhilani/events{/privacy}","received_events_url":"https://api.github.com/users/shreshthkhilani/received_events","type":"User","site_admin":false},"body":"More detail about how a jsonb field would help track changes. The JSON could look something like this: \r\n```json\r\n{\r\n  \"old\": {},\r\n  \"new\": {}\r\n}\r\n```\r\nThe `old` and `new` keys would have the state of the object prior to this action and the `new` key would have the state of the object after this action. \r\nIn case of a create, the `old` key would be `null`. In case of delete, `new` would be `null`. In case of an update, `old` and `new` would both be non null.\r\n\r\nAlternatively, we could also just track the `new` state. ","created_at":"2018-09-25T15:06:22Z","updated_at":"2018-09-25T15:06:22Z","html_url":"https://github.com/WorldBank-Transport/DRIVER/pull/719#discussion_r220231758","pull_request_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/pulls/719","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/WorldBank-Transport/DRIVER/pulls/comments/220231758"},"html":{"href":"https://github.com/WorldBank-Transport/DRIVER/pull/719#discussion_r220231758"},"pull_request":{"href":"https://api.github.com/repos/WorldBank-Transport/DRIVER/pulls/719"}},"in_reply_to_id":219966560},"pull_request":{"url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/pulls/719","id":217358635,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE3MzU4NjM1","html_url":"https://github.com/WorldBank-Transport/DRIVER/pull/719","diff_url":"https://github.com/WorldBank-Transport/DRIVER/pull/719.diff","patch_url":"https://github.com/WorldBank-Transport/DRIVER/pull/719.patch","issue_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/issues/719","number":719,"state":"open","locked":false,"title":"[WiP] Save original record every time a Record is created","user":{"login":"shreshthkhilani","id":3959096,"node_id":"MDQ6VXNlcjM5NTkwOTY=","avatar_url":"https://avatars0.githubusercontent.com/u/3959096?v=4","gravatar_id":"","url":"https://api.github.com/users/shreshthkhilani","html_url":"https://github.com/shreshthkhilani","followers_url":"https://api.github.com/users/shreshthkhilani/followers","following_url":"https://api.github.com/users/shreshthkhilani/following{/other_user}","gists_url":"https://api.github.com/users/shreshthkhilani/gists{/gist_id}","starred_url":"https://api.github.com/users/shreshthkhilani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shreshthkhilani/subscriptions","organizations_url":"https://api.github.com/users/shreshthkhilani/orgs","repos_url":"https://api.github.com/users/shreshthkhilani/repos","events_url":"https://api.github.com/users/shreshthkhilani/events{/privacy}","received_events_url":"https://api.github.com/users/shreshthkhilani/received_events","type":"User","site_admin":false},"body":"## Overview\r\n\r\nExtends the model for `RecordAuditLogEntry` and writes the entire record to it on create. \r\n\r\n### Checklist\r\n\r\n- [x] PR has a descriptive enough title to be useful in changelogs\r\n\r\n## Testing Instructions\r\n\r\n * How to test this PR\r\n * Prefer bulleted description\r\n * Start after checking out this branch\r\n * Include any setup required, such as bundling scripts, restarting services, etc.\r\n * Include test case, and expected output\r\n\r\nCloses [#160206283](https://www.pivotaltracker.com/story/show/160206283)","created_at":"2018-09-21T18:00:28Z","updated_at":"2018-09-25T15:06:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9361cbc1fb2fbb68d147daf63158ac06979ad9bf","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/pulls/719/commits","review_comments_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/pulls/719/comments","review_comment_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/pulls/comments{/number}","comments_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/issues/719/comments","statuses_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/statuses/ee173f235b790bcaf0dc3c598a4db96da0d1d686","head":{"label":"WorldBank-Transport:feature/extend-audit-log","ref":"feature/extend-audit-log","sha":"ee173f235b790bcaf0dc3c598a4db96da0d1d686","user":{"login":"WorldBank-Transport","id":5641611,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU2NDE2MTE=","avatar_url":"https://avatars3.githubusercontent.com/u/5641611?v=4","gravatar_id":"","url":"https://api.github.com/users/WorldBank-Transport","html_url":"https://github.com/WorldBank-Transport","followers_url":"https://api.github.com/users/WorldBank-Transport/followers","following_url":"https://api.github.com/users/WorldBank-Transport/following{/other_user}","gists_url":"https://api.github.com/users/WorldBank-Transport/gists{/gist_id}","starred_url":"https://api.github.com/users/WorldBank-Transport/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WorldBank-Transport/subscriptions","organizations_url":"https://api.github.com/users/WorldBank-Transport/orgs","repos_url":"https://api.github.com/users/WorldBank-Transport/repos","events_url":"https://api.github.com/users/WorldBank-Transport/events{/privacy}","received_events_url":"https://api.github.com/users/WorldBank-Transport/received_events","type":"Organization","site_admin":false},"repo":{"id":35051490,"node_id":"MDEwOlJlcG9zaXRvcnkzNTA1MTQ5MA==","name":"DRIVER","full_name":"WorldBank-Transport/DRIVER","private":false,"owner":{"login":"WorldBank-Transport","id":5641611,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU2NDE2MTE=","avatar_url":"https://avatars3.githubusercontent.com/u/5641611?v=4","gravatar_id":"","url":"https://api.github.com/users/WorldBank-Transport","html_url":"https://github.com/WorldBank-Transport","followers_url":"https://api.github.com/users/WorldBank-Transport/followers","following_url":"https://api.github.com/users/WorldBank-Transport/following{/other_user}","gists_url":"https://api.github.com/users/WorldBank-Transport/gists{/gist_id}","starred_url":"https://api.github.com/users/WorldBank-Transport/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WorldBank-Transport/subscriptions","organizations_url":"https://api.github.com/users/WorldBank-Transport/orgs","repos_url":"https://api.github.com/users/WorldBank-Transport/repos","events_url":"https://api.github.com/users/WorldBank-Transport/events{/privacy}","received_events_url":"https://api.github.com/users/WorldBank-Transport/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/WorldBank-Transport/DRIVER","description":"DRIVER - Data for Road Incident Visualization, Evaluation, and Reporting ","fork":false,"url":"https://api.github.com/repos/WorldBank-Transport/DRIVER","forks_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/forks","keys_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/keys{/key_id}","collaborators_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/teams","hooks_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/hooks","issue_events_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/issues/events{/number}","events_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/events","assignees_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/assignees{/user}","branches_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/branches{/branch}","tags_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/tags","blobs_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/git/refs{/sha}","trees_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/git/trees{/sha}","statuses_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/statuses/{sha}","languages_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/languages","stargazers_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/stargazers","contributors_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/contributors","subscribers_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/subscribers","subscription_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/subscription","commits_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/commits{/sha}","git_commits_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/git/commits{/sha}","comments_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/comments{/number}","issue_comment_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/issues/comments{/number}","contents_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/contents/{+path}","compare_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/compare/{base}...{head}","merges_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/merges","archive_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/downloads","issues_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/issues{/number}","pulls_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/pulls{/number}","milestones_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/milestones{/number}","notifications_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/labels{/name}","releases_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/releases{/id}","deployments_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/deployments","created_at":"2015-05-04T18:20:38Z","updated_at":"2018-09-24T21:17:41Z","pushed_at":"2018-09-25T13:38:29Z","git_url":"git://github.com/WorldBank-Transport/DRIVER.git","ssh_url":"git@github.com:WorldBank-Transport/DRIVER.git","clone_url":"https://github.com/WorldBank-Transport/DRIVER.git","svn_url":"https://github.com/WorldBank-Transport/DRIVER","homepage":null,"size":20968,"stargazers_count":18,"watchers_count":18,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":18,"mirror_url":null,"archived":false,"open_issues_count":38,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":18,"open_issues":38,"watchers":18,"default_branch":"master"}},"base":{"label":"WorldBank-Transport:develop","ref":"develop","sha":"bd74c074018b7631db01624444ccf087e81d0370","user":{"login":"WorldBank-Transport","id":5641611,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU2NDE2MTE=","avatar_url":"https://avatars3.githubusercontent.com/u/5641611?v=4","gravatar_id":"","url":"https://api.github.com/users/WorldBank-Transport","html_url":"https://github.com/WorldBank-Transport","followers_url":"https://api.github.com/users/WorldBank-Transport/followers","following_url":"https://api.github.com/users/WorldBank-Transport/following{/other_user}","gists_url":"https://api.github.com/users/WorldBank-Transport/gists{/gist_id}","starred_url":"https://api.github.com/users/WorldBank-Transport/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WorldBank-Transport/subscriptions","organizations_url":"https://api.github.com/users/WorldBank-Transport/orgs","repos_url":"https://api.github.com/users/WorldBank-Transport/repos","events_url":"https://api.github.com/users/WorldBank-Transport/events{/privacy}","received_events_url":"https://api.github.com/users/WorldBank-Transport/received_events","type":"Organization","site_admin":false},"repo":{"id":35051490,"node_id":"MDEwOlJlcG9zaXRvcnkzNTA1MTQ5MA==","name":"DRIVER","full_name":"WorldBank-Transport/DRIVER","private":false,"owner":{"login":"WorldBank-Transport","id":5641611,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU2NDE2MTE=","avatar_url":"https://avatars3.githubusercontent.com/u/5641611?v=4","gravatar_id":"","url":"https://api.github.com/users/WorldBank-Transport","html_url":"https://github.com/WorldBank-Transport","followers_url":"https://api.github.com/users/WorldBank-Transport/followers","following_url":"https://api.github.com/users/WorldBank-Transport/following{/other_user}","gists_url":"https://api.github.com/users/WorldBank-Transport/gists{/gist_id}","starred_url":"https://api.github.com/users/WorldBank-Transport/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WorldBank-Transport/subscriptions","organizations_url":"https://api.github.com/users/WorldBank-Transport/orgs","repos_url":"https://api.github.com/users/WorldBank-Transport/repos","events_url":"https://api.github.com/users/WorldBank-Transport/events{/privacy}","received_events_url":"https://api.github.com/users/WorldBank-Transport/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/WorldBank-Transport/DRIVER","description":"DRIVER - Data for Road Incident Visualization, Evaluation, and Reporting ","fork":false,"url":"https://api.github.com/repos/WorldBank-Transport/DRIVER","forks_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/forks","keys_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/keys{/key_id}","collaborators_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/teams","hooks_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/hooks","issue_events_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/issues/events{/number}","events_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/events","assignees_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/assignees{/user}","branches_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/branches{/branch}","tags_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/tags","blobs_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/git/refs{/sha}","trees_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/git/trees{/sha}","statuses_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/statuses/{sha}","languages_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/languages","stargazers_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/stargazers","contributors_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/contributors","subscribers_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/subscribers","subscription_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/subscription","commits_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/commits{/sha}","git_commits_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/git/commits{/sha}","comments_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/comments{/number}","issue_comment_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/issues/comments{/number}","contents_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/contents/{+path}","compare_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/compare/{base}...{head}","merges_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/merges","archive_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/downloads","issues_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/issues{/number}","pulls_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/pulls{/number}","milestones_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/milestones{/number}","notifications_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/labels{/name}","releases_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/releases{/id}","deployments_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/deployments","created_at":"2015-05-04T18:20:38Z","updated_at":"2018-09-24T21:17:41Z","pushed_at":"2018-09-25T13:38:29Z","git_url":"git://github.com/WorldBank-Transport/DRIVER.git","ssh_url":"git@github.com:WorldBank-Transport/DRIVER.git","clone_url":"https://github.com/WorldBank-Transport/DRIVER.git","svn_url":"https://github.com/WorldBank-Transport/DRIVER","homepage":null,"size":20968,"stargazers_count":18,"watchers_count":18,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":18,"mirror_url":null,"archived":false,"open_issues_count":38,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":18,"open_issues":38,"watchers":18,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/WorldBank-Transport/DRIVER/pulls/719"},"html":{"href":"https://github.com/WorldBank-Transport/DRIVER/pull/719"},"issue":{"href":"https://api.github.com/repos/WorldBank-Transport/DRIVER/issues/719"},"comments":{"href":"https://api.github.com/repos/WorldBank-Transport/DRIVER/issues/719/comments"},"review_comments":{"href":"https://api.github.com/repos/WorldBank-Transport/DRIVER/pulls/719/comments"},"review_comment":{"href":"https://api.github.com/repos/WorldBank-Transport/DRIVER/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/WorldBank-Transport/DRIVER/pulls/719/commits"},"statuses":{"href":"https://api.github.com/repos/WorldBank-Transport/DRIVER/statuses/ee173f235b790bcaf0dc3c598a4db96da0d1d686"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"shreshthkhilani"}}