{"action":"opened","number":133,"pull_request":{"url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/pulls/133","id":57337849,"html_url":"https://github.com/ministryofjustice/prison-visits-2/pull/133","diff_url":"https://github.com/ministryofjustice/prison-visits-2/pull/133.diff","patch_url":"https://github.com/ministryofjustice/prison-visits-2/pull/133.patch","issue_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/issues/133","number":133,"state":"open","locked":false,"title":"Use Scenic to define and maintain views","user":{"login":"threedaymonk","id":17347,"avatar_url":"https://avatars.githubusercontent.com/u/17347?v=3","gravatar_id":"","url":"https://api.github.com/users/threedaymonk","html_url":"https://github.com/threedaymonk","followers_url":"https://api.github.com/users/threedaymonk/followers","following_url":"https://api.github.com/users/threedaymonk/following{/other_user}","gists_url":"https://api.github.com/users/threedaymonk/gists{/gist_id}","starred_url":"https://api.github.com/users/threedaymonk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/threedaymonk/subscriptions","organizations_url":"https://api.github.com/users/threedaymonk/orgs","repos_url":"https://api.github.com/users/threedaymonk/repos","events_url":"https://api.github.com/users/threedaymonk/events{/privacy}","received_events_url":"https://api.github.com/users/threedaymonk/received_events","type":"User","site_admin":false},"body":"Scenic is a plugin for managing Postgres views in Rails: https://github.com/thoughtbot/scenic\r\n\r\nThis allows us to return to the Ruby database schema. Whilst this has some problems of its own (producing unnecessarily large changes in order to line up columns), it doesn't vary on seemingly arbitrary things like generated index names and should make changes more manageable.","created_at":"2016-01-27T10:08:51Z","updated_at":"2016-01-27T10:08:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/pulls/133/commits","review_comments_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/pulls/133/comments","review_comment_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/issues/133/comments","statuses_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/statuses/0a56974412de91d50260184535c764cf7bb2f6fc","head":{"label":"ministryofjustice:move-views-to-scenic","ref":"move-views-to-scenic","sha":"0a56974412de91d50260184535c764cf7bb2f6fc","user":{"login":"ministryofjustice","id":2203574,"avatar_url":"https://avatars.githubusercontent.com/u/2203574?v=3","gravatar_id":"","url":"https://api.github.com/users/ministryofjustice","html_url":"https://github.com/ministryofjustice","followers_url":"https://api.github.com/users/ministryofjustice/followers","following_url":"https://api.github.com/users/ministryofjustice/following{/other_user}","gists_url":"https://api.github.com/users/ministryofjustice/gists{/gist_id}","starred_url":"https://api.github.com/users/ministryofjustice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ministryofjustice/subscriptions","organizations_url":"https://api.github.com/users/ministryofjustice/orgs","repos_url":"https://api.github.com/users/ministryofjustice/repos","events_url":"https://api.github.com/users/ministryofjustice/events{/privacy}","received_events_url":"https://api.github.com/users/ministryofjustice/received_events","type":"Organization","site_admin":false},"repo":{"id":44737633,"name":"prison-visits-2","full_name":"ministryofjustice/prison-visits-2","owner":{"login":"ministryofjustice","id":2203574,"avatar_url":"https://avatars.githubusercontent.com/u/2203574?v=3","gravatar_id":"","url":"https://api.github.com/users/ministryofjustice","html_url":"https://github.com/ministryofjustice","followers_url":"https://api.github.com/users/ministryofjustice/followers","following_url":"https://api.github.com/users/ministryofjustice/following{/other_user}","gists_url":"https://api.github.com/users/ministryofjustice/gists{/gist_id}","starred_url":"https://api.github.com/users/ministryofjustice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ministryofjustice/subscriptions","organizations_url":"https://api.github.com/users/ministryofjustice/orgs","repos_url":"https://api.github.com/users/ministryofjustice/repos","events_url":"https://api.github.com/users/ministryofjustice/events{/privacy}","received_events_url":"https://api.github.com/users/ministryofjustice/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ministryofjustice/prison-visits-2","description":"A full ground-up rewrite","fork":false,"url":"https://api.github.com/repos/ministryofjustice/prison-visits-2","forks_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/forks","keys_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/teams","hooks_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/hooks","issue_events_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/issues/events{/number}","events_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/events","assignees_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/assignees{/user}","branches_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/branches{/branch}","tags_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/tags","blobs_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/git/refs{/sha}","trees_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/statuses/{sha}","languages_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/languages","stargazers_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/stargazers","contributors_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/contributors","subscribers_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/subscribers","subscription_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/subscription","commits_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/commits{/sha}","git_commits_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/git/commits{/sha}","comments_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/comments{/number}","issue_comment_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/issues/comments{/number}","contents_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/contents/{+path}","compare_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/merges","archive_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/downloads","issues_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/issues{/number}","pulls_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/pulls{/number}","milestones_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/milestones{/number}","notifications_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/labels{/name}","releases_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/releases{/id}","deployments_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/deployments","created_at":"2015-10-22T10:12:32Z","updated_at":"2016-01-18T22:38:40Z","pushed_at":"2016-01-27T10:07:43Z","git_url":"git://github.com/ministryofjustice/prison-visits-2.git","ssh_url":"git@github.com:ministryofjustice/prison-visits-2.git","clone_url":"https://github.com/ministryofjustice/prison-visits-2.git","svn_url":"https://github.com/ministryofjustice/prison-visits-2","homepage":"","size":1255,"stargazers_count":2,"watchers_count":2,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":2,"default_branch":"master"}},"base":{"label":"ministryofjustice:master","ref":"master","sha":"795af631e4b1e957e0a9e387e25c4c733e1eaeaa","user":{"login":"ministryofjustice","id":2203574,"avatar_url":"https://avatars.githubusercontent.com/u/2203574?v=3","gravatar_id":"","url":"https://api.github.com/users/ministryofjustice","html_url":"https://github.com/ministryofjustice","followers_url":"https://api.github.com/users/ministryofjustice/followers","following_url":"https://api.github.com/users/ministryofjustice/following{/other_user}","gists_url":"https://api.github.com/users/ministryofjustice/gists{/gist_id}","starred_url":"https://api.github.com/users/ministryofjustice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ministryofjustice/subscriptions","organizations_url":"https://api.github.com/users/ministryofjustice/orgs","repos_url":"https://api.github.com/users/ministryofjustice/repos","events_url":"https://api.github.com/users/ministryofjustice/events{/privacy}","received_events_url":"https://api.github.com/users/ministryofjustice/received_events","type":"Organization","site_admin":false},"repo":{"id":44737633,"name":"prison-visits-2","full_name":"ministryofjustice/prison-visits-2","owner":{"login":"ministryofjustice","id":2203574,"avatar_url":"https://avatars.githubusercontent.com/u/2203574?v=3","gravatar_id":"","url":"https://api.github.com/users/ministryofjustice","html_url":"https://github.com/ministryofjustice","followers_url":"https://api.github.com/users/ministryofjustice/followers","following_url":"https://api.github.com/users/ministryofjustice/following{/other_user}","gists_url":"https://api.github.com/users/ministryofjustice/gists{/gist_id}","starred_url":"https://api.github.com/users/ministryofjustice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ministryofjustice/subscriptions","organizations_url":"https://api.github.com/users/ministryofjustice/orgs","repos_url":"https://api.github.com/users/ministryofjustice/repos","events_url":"https://api.github.com/users/ministryofjustice/events{/privacy}","received_events_url":"https://api.github.com/users/ministryofjustice/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ministryofjustice/prison-visits-2","description":"A full ground-up rewrite","fork":false,"url":"https://api.github.com/repos/ministryofjustice/prison-visits-2","forks_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/forks","keys_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/teams","hooks_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/hooks","issue_events_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/issues/events{/number}","events_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/events","assignees_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/assignees{/user}","branches_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/branches{/branch}","tags_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/tags","blobs_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/git/refs{/sha}","trees_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/statuses/{sha}","languages_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/languages","stargazers_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/stargazers","contributors_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/contributors","subscribers_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/subscribers","subscription_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/subscription","commits_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/commits{/sha}","git_commits_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/git/commits{/sha}","comments_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/comments{/number}","issue_comment_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/issues/comments{/number}","contents_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/contents/{+path}","compare_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/merges","archive_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/downloads","issues_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/issues{/number}","pulls_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/pulls{/number}","milestones_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/milestones{/number}","notifications_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/labels{/name}","releases_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/releases{/id}","deployments_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/deployments","created_at":"2015-10-22T10:12:32Z","updated_at":"2016-01-18T22:38:40Z","pushed_at":"2016-01-27T10:07:43Z","git_url":"git://github.com/ministryofjustice/prison-visits-2.git","ssh_url":"git@github.com:ministryofjustice/prison-visits-2.git","clone_url":"https://github.com/ministryofjustice/prison-visits-2.git","svn_url":"https://github.com/ministryofjustice/prison-visits-2","homepage":"","size":1255,"stargazers_count":2,"watchers_count":2,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ministryofjustice/prison-visits-2/pulls/133"},"html":{"href":"https://github.com/ministryofjustice/prison-visits-2/pull/133"},"issue":{"href":"https://api.github.com/repos/ministryofjustice/prison-visits-2/issues/133"},"comments":{"href":"https://api.github.com/repos/ministryofjustice/prison-visits-2/issues/133/comments"},"review_comments":{"href":"https://api.github.com/repos/ministryofjustice/prison-visits-2/pulls/133/comments"},"review_comment":{"href":"https://api.github.com/repos/ministryofjustice/prison-visits-2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ministryofjustice/prison-visits-2/pulls/133/commits"},"statuses":{"href":"https://api.github.com/repos/ministryofjustice/prison-visits-2/statuses/0a56974412de91d50260184535c764cf7bb2f6fc"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":250,"deletions":63,"changed_files":15}}