{"action":"created","comment":{"url":"https://api.github.com/repos/jmmastey/level_up_exercises/pulls/comments/26987270","id":26987270,"diff_hunk":"@@ -0,0 +1,90 @@\n+-- Usage: psql -d postgres -f yadda/yadda-schema.sql\n+--   -d database, using default\n+--   -f sql file to import\n+\n+-- We will skip this approach in favor of dropping on a per-table basis\n+-- DROP DATABASE IF EXISTS yadda;\n+-- CREATE DATABASE yadda;\n+\n+\\connect yadda;\n+\n+DROP TABLE IF EXISTS person CASCADE;\n+CREATE TABLE person (\n+  person_id       serial PRIMARY KEY,\n+  name            varchar(50) NOT NULL,\n+  email           varchar(100) NOT NULL,\n+  description     text,\n+  birthday        date NOT NULL,\n+  created_at      timestamp with time zone,\n+  updated_at      timestamp with time zone,\n+  updated_by      integer NOT NULL,\n+  CONSTRAINT updated_by_key FOREIGN KEY (updated_by)\n+    REFERENCES person (person_id)\n+    ON DELETE RESTRICT\n+);\n+COMMENT ON TABLE person IS 'Person information';\n+\n+DROP TABLE IF EXISTS brewery CASCADE;\n+CREATE TABLE brewery (\n+  brewery_id      serial PRIMARY KEY,\n+  name            varchar(250) NOT NULL,\n+  address         varchar(100),\n+  city            varchar(50),\n+  state           char(2),\n+  postal_code     varchar(20),\n+  description     text,\n+  founding_year   integer,\n+  created_at      timestamp with time zone,\n+  updated_at      timestamp with time zone,\n+  updated_by      integer NOT NULL,\n+  CONSTRAINT updated_by_key FOREIGN KEY (updated_by)\n+    REFERENCES person (person_id)\n+    ON DELETE RESTRICT\n+);\n+COMMENT ON TABLE brewery IS 'Brewery information';\n+\n+DROP TABLE IF EXISTS beer CASCADE;\n+CREATE TABLE beer (\n+  beer_id         serial PRIMARY KEY,\n+  brewery_id      integer NOT NULL,\n+  name            varchar(250) NOT NULL,\n+  style           varchar(25),","path":"yadda/yadda-schema.sql","position":51,"original_position":51,"commit_id":"727ef914ccea6a734a67fcce604bee340e8c5530","original_commit_id":"727ef914ccea6a734a67fcce604bee340e8c5530","user":{"login":"incazteca","id":2825820,"avatar_url":"https://avatars.githubusercontent.com/u/2825820?v=3","gravatar_id":"","url":"https://api.github.com/users/incazteca","html_url":"https://github.com/incazteca","followers_url":"https://api.github.com/users/incazteca/followers","following_url":"https://api.github.com/users/incazteca/following{/other_user}","gists_url":"https://api.github.com/users/incazteca/gists{/gist_id}","starred_url":"https://api.github.com/users/incazteca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/incazteca/subscriptions","organizations_url":"https://api.github.com/users/incazteca/orgs","repos_url":"https://api.github.com/users/incazteca/repos","events_url":"https://api.github.com/users/incazteca/events{/privacy}","received_events_url":"https://api.github.com/users/incazteca/received_events","type":"User","site_admin":false},"body":"Normalize the beer table so that style is a lookup table.","created_at":"2015-03-23T22:28:39Z","updated_at":"2015-03-23T22:28:39Z","html_url":"https://github.com/jmmastey/level_up_exercises/pull/577#discussion_r26987270","pull_request_url":"https://api.github.com/repos/jmmastey/level_up_exercises/pulls/577","_links":{"self":{"href":"https://api.github.com/repos/jmmastey/level_up_exercises/pulls/comments/26987270"},"html":{"href":"https://github.com/jmmastey/level_up_exercises/pull/577#discussion_r26987270"},"pull_request":{"href":"https://api.github.com/repos/jmmastey/level_up_exercises/pulls/577"}}},"pull_request":{"url":"https://api.github.com/repos/jmmastey/level_up_exercises/pulls/577","id":31745307,"html_url":"https://github.com/jmmastey/level_up_exercises/pull/577","diff_url":"https://github.com/jmmastey/level_up_exercises/pull/577.diff","patch_url":"https://github.com/jmmastey/level_up_exercises/pull/577.patch","issue_url":"https://api.github.com/repos/jmmastey/level_up_exercises/issues/577","number":577,"state":"open","locked":false,"title":"Yadda 20150107 rc","user":{"login":"ryancowan","id":1890590,"avatar_url":"https://avatars.githubusercontent.com/u/1890590?v=3","gravatar_id":"","url":"https://api.github.com/users/ryancowan","html_url":"https://github.com/ryancowan","followers_url":"https://api.github.com/users/ryancowan/followers","following_url":"https://api.github.com/users/ryancowan/following{/other_user}","gists_url":"https://api.github.com/users/ryancowan/gists{/gist_id}","starred_url":"https://api.github.com/users/ryancowan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryancowan/subscriptions","organizations_url":"https://api.github.com/users/ryancowan/orgs","repos_url":"https://api.github.com/users/ryancowan/repos","events_url":"https://api.github.com/users/ryancowan/events{/privacy}","received_events_url":"https://api.github.com/users/ryancowan/received_events","type":"User","site_admin":false},"body":"This pull request is only for Yadda part 1. There is some additional work in it for parts 2, 3, and 4; I plan to submit separate PRs for those after the work has been reviewed by other members of my team (Trogdor).\r\n\r\nFiles for part 1:\r\n-yadda/yadda-schema.sql\r\n\r\nThe schema file contains instructions on how to use.","created_at":"2015-03-23T15:53:29Z","updated_at":"2015-03-23T22:28:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e8e723b012ec32ee14636936f6260463195cf753","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jmmastey/level_up_exercises/pulls/577/commits","review_comments_url":"https://api.github.com/repos/jmmastey/level_up_exercises/pulls/577/comments","review_comment_url":"https://api.github.com/repos/jmmastey/level_up_exercises/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jmmastey/level_up_exercises/issues/577/comments","statuses_url":"https://api.github.com/repos/jmmastey/level_up_exercises/statuses/727ef914ccea6a734a67fcce604bee340e8c5530","head":{"label":"ryancowan:yadda_20150107_rc","ref":"yadda_20150107_rc","sha":"727ef914ccea6a734a67fcce604bee340e8c5530","user":{"login":"ryancowan","id":1890590,"avatar_url":"https://avatars.githubusercontent.com/u/1890590?v=3","gravatar_id":"","url":"https://api.github.com/users/ryancowan","html_url":"https://github.com/ryancowan","followers_url":"https://api.github.com/users/ryancowan/followers","following_url":"https://api.github.com/users/ryancowan/following{/other_user}","gists_url":"https://api.github.com/users/ryancowan/gists{/gist_id}","starred_url":"https://api.github.com/users/ryancowan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryancowan/subscriptions","organizations_url":"https://api.github.com/users/ryancowan/orgs","repos_url":"https://api.github.com/users/ryancowan/repos","events_url":"https://api.github.com/users/ryancowan/events{/privacy}","received_events_url":"https://api.github.com/users/ryancowan/received_events","type":"User","site_admin":false},"repo":{"id":24423001,"name":"level_up_exercises","full_name":"ryancowan/level_up_exercises","owner":{"login":"ryancowan","id":1890590,"avatar_url":"https://avatars.githubusercontent.com/u/1890590?v=3","gravatar_id":"","url":"https://api.github.com/users/ryancowan","html_url":"https://github.com/ryancowan","followers_url":"https://api.github.com/users/ryancowan/followers","following_url":"https://api.github.com/users/ryancowan/following{/other_user}","gists_url":"https://api.github.com/users/ryancowan/gists{/gist_id}","starred_url":"https://api.github.com/users/ryancowan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryancowan/subscriptions","organizations_url":"https://api.github.com/users/ryancowan/orgs","repos_url":"https://api.github.com/users/ryancowan/repos","events_url":"https://api.github.com/users/ryancowan/events{/privacy}","received_events_url":"https://api.github.com/users/ryancowan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ryancowan/level_up_exercises","description":"A long series of code-related assignments to challenge starting engineers","fork":true,"url":"https://api.github.com/repos/ryancowan/level_up_exercises","forks_url":"https://api.github.com/repos/ryancowan/level_up_exercises/forks","keys_url":"https://api.github.com/repos/ryancowan/level_up_exercises/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ryancowan/level_up_exercises/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ryancowan/level_up_exercises/teams","hooks_url":"https://api.github.com/repos/ryancowan/level_up_exercises/hooks","issue_events_url":"https://api.github.com/repos/ryancowan/level_up_exercises/issues/events{/number}","events_url":"https://api.github.com/repos/ryancowan/level_up_exercises/events","assignees_url":"https://api.github.com/repos/ryancowan/level_up_exercises/assignees{/user}","branches_url":"https://api.github.com/repos/ryancowan/level_up_exercises/branches{/branch}","tags_url":"https://api.github.com/repos/ryancowan/level_up_exercises/tags","blobs_url":"https://api.github.com/repos/ryancowan/level_up_exercises/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ryancowan/level_up_exercises/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ryancowan/level_up_exercises/git/refs{/sha}","trees_url":"https://api.github.com/repos/ryancowan/level_up_exercises/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ryancowan/level_up_exercises/statuses/{sha}","languages_url":"https://api.github.com/repos/ryancowan/level_up_exercises/languages","stargazers_url":"https://api.github.com/repos/ryancowan/level_up_exercises/stargazers","contributors_url":"https://api.github.com/repos/ryancowan/level_up_exercises/contributors","subscribers_url":"https://api.github.com/repos/ryancowan/level_up_exercises/subscribers","subscription_url":"https://api.github.com/repos/ryancowan/level_up_exercises/subscription","commits_url":"https://api.github.com/repos/ryancowan/level_up_exercises/commits{/sha}","git_commits_url":"https://api.github.com/repos/ryancowan/level_up_exercises/git/commits{/sha}","comments_url":"https://api.github.com/repos/ryancowan/level_up_exercises/comments{/number}","issue_comment_url":"https://api.github.com/repos/ryancowan/level_up_exercises/issues/comments{/number}","contents_url":"https://api.github.com/repos/ryancowan/level_up_exercises/contents/{+path}","compare_url":"https://api.github.com/repos/ryancowan/level_up_exercises/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ryancowan/level_up_exercises/merges","archive_url":"https://api.github.com/repos/ryancowan/level_up_exercises/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ryancowan/level_up_exercises/downloads","issues_url":"https://api.github.com/repos/ryancowan/level_up_exercises/issues{/number}","pulls_url":"https://api.github.com/repos/ryancowan/level_up_exercises/pulls{/number}","milestones_url":"https://api.github.com/repos/ryancowan/level_up_exercises/milestones{/number}","notifications_url":"https://api.github.com/repos/ryancowan/level_up_exercises/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ryancowan/level_up_exercises/labels{/name}","releases_url":"https://api.github.com/repos/ryancowan/level_up_exercises/releases{/id}","created_at":"2014-09-24T16:30:44Z","updated_at":"2014-09-02T21:41:48Z","pushed_at":"2015-03-23T19:54:48Z","git_url":"git://github.com/ryancowan/level_up_exercises.git","ssh_url":"git@github.com:ryancowan/level_up_exercises.git","clone_url":"https://github.com/ryancowan/level_up_exercises.git","svn_url":"https://github.com/ryancowan/level_up_exercises","homepage":null,"size":1717,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"jmmastey:master","ref":"master","sha":"3e3674d559a7fc13d04f36fe6734e77c468c5076","user":{"login":"jmmastey","id":302011,"avatar_url":"https://avatars.githubusercontent.com/u/302011?v=3","gravatar_id":"","url":"https://api.github.com/users/jmmastey","html_url":"https://github.com/jmmastey","followers_url":"https://api.github.com/users/jmmastey/followers","following_url":"https://api.github.com/users/jmmastey/following{/other_user}","gists_url":"https://api.github.com/users/jmmastey/gists{/gist_id}","starred_url":"https://api.github.com/users/jmmastey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmmastey/subscriptions","organizations_url":"https://api.github.com/users/jmmastey/orgs","repos_url":"https://api.github.com/users/jmmastey/repos","events_url":"https://api.github.com/users/jmmastey/events{/privacy}","received_events_url":"https://api.github.com/users/jmmastey/received_events","type":"User","site_admin":false},"repo":{"id":20705648,"name":"level_up_exercises","full_name":"jmmastey/level_up_exercises","owner":{"login":"jmmastey","id":302011,"avatar_url":"https://avatars.githubusercontent.com/u/302011?v=3","gravatar_id":"","url":"https://api.github.com/users/jmmastey","html_url":"https://github.com/jmmastey","followers_url":"https://api.github.com/users/jmmastey/followers","following_url":"https://api.github.com/users/jmmastey/following{/other_user}","gists_url":"https://api.github.com/users/jmmastey/gists{/gist_id}","starred_url":"https://api.github.com/users/jmmastey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmmastey/subscriptions","organizations_url":"https://api.github.com/users/jmmastey/orgs","repos_url":"https://api.github.com/users/jmmastey/repos","events_url":"https://api.github.com/users/jmmastey/events{/privacy}","received_events_url":"https://api.github.com/users/jmmastey/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jmmastey/level_up_exercises","description":"A series of code-related assignments to challenge starting engineers","fork":false,"url":"https://api.github.com/repos/jmmastey/level_up_exercises","forks_url":"https://api.github.com/repos/jmmastey/level_up_exercises/forks","keys_url":"https://api.github.com/repos/jmmastey/level_up_exercises/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jmmastey/level_up_exercises/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jmmastey/level_up_exercises/teams","hooks_url":"https://api.github.com/repos/jmmastey/level_up_exercises/hooks","issue_events_url":"https://api.github.com/repos/jmmastey/level_up_exercises/issues/events{/number}","events_url":"https://api.github.com/repos/jmmastey/level_up_exercises/events","assignees_url":"https://api.github.com/repos/jmmastey/level_up_exercises/assignees{/user}","branches_url":"https://api.github.com/repos/jmmastey/level_up_exercises/branches{/branch}","tags_url":"https://api.github.com/repos/jmmastey/level_up_exercises/tags","blobs_url":"https://api.github.com/repos/jmmastey/level_up_exercises/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jmmastey/level_up_exercises/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jmmastey/level_up_exercises/git/refs{/sha}","trees_url":"https://api.github.com/repos/jmmastey/level_up_exercises/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jmmastey/level_up_exercises/statuses/{sha}","languages_url":"https://api.github.com/repos/jmmastey/level_up_exercises/languages","stargazers_url":"https://api.github.com/repos/jmmastey/level_up_exercises/stargazers","contributors_url":"https://api.github.com/repos/jmmastey/level_up_exercises/contributors","subscribers_url":"https://api.github.com/repos/jmmastey/level_up_exercises/subscribers","subscription_url":"https://api.github.com/repos/jmmastey/level_up_exercises/subscription","commits_url":"https://api.github.com/repos/jmmastey/level_up_exercises/commits{/sha}","git_commits_url":"https://api.github.com/repos/jmmastey/level_up_exercises/git/commits{/sha}","comments_url":"https://api.github.com/repos/jmmastey/level_up_exercises/comments{/number}","issue_comment_url":"https://api.github.com/repos/jmmastey/level_up_exercises/issues/comments{/number}","contents_url":"https://api.github.com/repos/jmmastey/level_up_exercises/contents/{+path}","compare_url":"https://api.github.com/repos/jmmastey/level_up_exercises/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jmmastey/level_up_exercises/merges","archive_url":"https://api.github.com/repos/jmmastey/level_up_exercises/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jmmastey/level_up_exercises/downloads","issues_url":"https://api.github.com/repos/jmmastey/level_up_exercises/issues{/number}","pulls_url":"https://api.github.com/repos/jmmastey/level_up_exercises/pulls{/number}","milestones_url":"https://api.github.com/repos/jmmastey/level_up_exercises/milestones{/number}","notifications_url":"https://api.github.com/repos/jmmastey/level_up_exercises/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jmmastey/level_up_exercises/labels{/name}","releases_url":"https://api.github.com/repos/jmmastey/level_up_exercises/releases{/id}","created_at":"2014-06-10T23:42:24Z","updated_at":"2015-03-19T01:44:13Z","pushed_at":"2015-03-23T15:53:31Z","git_url":"git://github.com/jmmastey/level_up_exercises.git","ssh_url":"git@github.com:jmmastey/level_up_exercises.git","clone_url":"https://github.com/jmmastey/level_up_exercises.git","svn_url":"https://github.com/jmmastey/level_up_exercises","homepage":"http://leveluprails.herokuapp.com","size":147322,"stargazers_count":17,"watchers_count":17,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":78,"mirror_url":null,"open_issues_count":6,"forks":78,"open_issues":6,"watchers":17,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jmmastey/level_up_exercises/pulls/577"},"html":{"href":"https://github.com/jmmastey/level_up_exercises/pull/577"},"issue":{"href":"https://api.github.com/repos/jmmastey/level_up_exercises/issues/577"},"comments":{"href":"https://api.github.com/repos/jmmastey/level_up_exercises/issues/577/comments"},"review_comments":{"href":"https://api.github.com/repos/jmmastey/level_up_exercises/pulls/577/comments"},"review_comment":{"href":"https://api.github.com/repos/jmmastey/level_up_exercises/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jmmastey/level_up_exercises/pulls/577/commits"},"statuses":{"href":"https://api.github.com/repos/jmmastey/level_up_exercises/statuses/727ef914ccea6a734a67fcce604bee340e8c5530"}}}}