{"action":"opened","number":15,"pull_request":{"url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/pulls/15","id":53695701,"html_url":"https://github.com/holidayextras/jsonapi-store-relationaldb/pull/15","diff_url":"https://github.com/holidayextras/jsonapi-store-relationaldb/pull/15.diff","patch_url":"https://github.com/holidayextras/jsonapi-store-relationaldb/pull/15.patch","issue_url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/issues/15","number":15,"state":"open","locked":false,"title":"Make it easier to populate an empty database","user":{"login":"hxoliverrumbelow","id":3088374,"avatar_url":"https://avatars.githubusercontent.com/u/3088374?v=3","gravatar_id":"","url":"https://api.github.com/users/hxoliverrumbelow","html_url":"https://github.com/hxoliverrumbelow","followers_url":"https://api.github.com/users/hxoliverrumbelow/followers","following_url":"https://api.github.com/users/hxoliverrumbelow/following{/other_user}","gists_url":"https://api.github.com/users/hxoliverrumbelow/gists{/gist_id}","starred_url":"https://api.github.com/users/hxoliverrumbelow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hxoliverrumbelow/subscriptions","organizations_url":"https://api.github.com/users/hxoliverrumbelow/orgs","repos_url":"https://api.github.com/users/hxoliverrumbelow/repos","events_url":"https://api.github.com/users/hxoliverrumbelow/events{/privacy}","received_events_url":"https://api.github.com/users/hxoliverrumbelow/received_events","type":"User","site_admin":false},"body":"We've found when moving to staging that initialising a new database with the correct tables is a bit of a hassle.\r\n\r\nIt's now possible to call populate on a relationStore to cause it to synchronise (read: create tables and indexes, then populate it with the example resources). It will also output any+all SQL it produces either via the `logging` option, or as debug info via `DEBUG=jsonApi:store:relationaldb`\r\n```\r\njsonApi.define({\r\n  resource: 'articles',\r\n  handlers: new RelationalStore(config.jsonapi.store.relational).populate(),\r\n  ...\r\n```","created_at":"2015-12-15T12:16:26Z","updated_at":"2015-12-15T12:16:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/pulls/15/commits","review_comments_url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/pulls/15/comments","review_comment_url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/pulls/comments{/number}","comments_url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/issues/15/comments","statuses_url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/statuses/99ce7acebe4679d381d5d67c93797bfded3c6588","head":{"label":"holidayextras:ease-of-use","ref":"ease-of-use","sha":"99ce7acebe4679d381d5d67c93797bfded3c6588","user":{"login":"holidayextras","id":286993,"avatar_url":"https://avatars.githubusercontent.com/u/286993?v=3","gravatar_id":"","url":"https://api.github.com/users/holidayextras","html_url":"https://github.com/holidayextras","followers_url":"https://api.github.com/users/holidayextras/followers","following_url":"https://api.github.com/users/holidayextras/following{/other_user}","gists_url":"https://api.github.com/users/holidayextras/gists{/gist_id}","starred_url":"https://api.github.com/users/holidayextras/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/holidayextras/subscriptions","organizations_url":"https://api.github.com/users/holidayextras/orgs","repos_url":"https://api.github.com/users/holidayextras/repos","events_url":"https://api.github.com/users/holidayextras/events{/privacy}","received_events_url":"https://api.github.com/users/holidayextras/received_events","type":"Organization","site_admin":false},"repo":{"id":46495523,"name":"jsonapi-store-relationaldb","full_name":"holidayextras/jsonapi-store-relationaldb","owner":{"login":"holidayextras","id":286993,"avatar_url":"https://avatars.githubusercontent.com/u/286993?v=3","gravatar_id":"","url":"https://api.github.com/users/holidayextras","html_url":"https://github.com/holidayextras","followers_url":"https://api.github.com/users/holidayextras/followers","following_url":"https://api.github.com/users/holidayextras/following{/other_user}","gists_url":"https://api.github.com/users/holidayextras/gists{/gist_id}","starred_url":"https://api.github.com/users/holidayextras/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/holidayextras/subscriptions","organizations_url":"https://api.github.com/users/holidayextras/orgs","repos_url":"https://api.github.com/users/holidayextras/repos","events_url":"https://api.github.com/users/holidayextras/events{/privacy}","received_events_url":"https://api.github.com/users/holidayextras/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/holidayextras/jsonapi-store-relationaldb","description":"A relational database handler for jsonapi-server","fork":false,"url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb","forks_url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/forks","keys_url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/teams","hooks_url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/hooks","issue_events_url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/issues/events{/number}","events_url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/events","assignees_url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/assignees{/user}","branches_url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/branches{/branch}","tags_url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/tags","blobs_url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/git/refs{/sha}","trees_url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/statuses/{sha}","languages_url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/languages","stargazers_url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/stargazers","contributors_url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/contributors","subscribers_url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/subscribers","subscription_url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/subscription","commits_url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/commits{/sha}","git_commits_url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/git/commits{/sha}","comments_url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/comments{/number}","issue_comment_url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/issues/comments{/number}","contents_url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/contents/{+path}","compare_url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/merges","archive_url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/downloads","issues_url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/issues{/number}","pulls_url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/pulls{/number}","milestones_url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/milestones{/number}","notifications_url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/labels{/name}","releases_url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/releases{/id}","created_at":"2015-11-19T13:57:30Z","updated_at":"2015-12-02T15:13:34Z","pushed_at":"2015-12-15T12:11:04Z","git_url":"git://github.com/holidayextras/jsonapi-store-relationaldb.git","ssh_url":"git@github.com:holidayextras/jsonapi-store-relationaldb.git","clone_url":"https://github.com/holidayextras/jsonapi-store-relationaldb.git","svn_url":"https://github.com/holidayextras/jsonapi-store-relationaldb","homepage":null,"size":25,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":2,"default_branch":"master"}},"base":{"label":"holidayextras:master","ref":"master","sha":"e59a5c22020eb9549ff2806eff57d48a306db8a0","user":{"login":"holidayextras","id":286993,"avatar_url":"https://avatars.githubusercontent.com/u/286993?v=3","gravatar_id":"","url":"https://api.github.com/users/holidayextras","html_url":"https://github.com/holidayextras","followers_url":"https://api.github.com/users/holidayextras/followers","following_url":"https://api.github.com/users/holidayextras/following{/other_user}","gists_url":"https://api.github.com/users/holidayextras/gists{/gist_id}","starred_url":"https://api.github.com/users/holidayextras/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/holidayextras/subscriptions","organizations_url":"https://api.github.com/users/holidayextras/orgs","repos_url":"https://api.github.com/users/holidayextras/repos","events_url":"https://api.github.com/users/holidayextras/events{/privacy}","received_events_url":"https://api.github.com/users/holidayextras/received_events","type":"Organization","site_admin":false},"repo":{"id":46495523,"name":"jsonapi-store-relationaldb","full_name":"holidayextras/jsonapi-store-relationaldb","owner":{"login":"holidayextras","id":286993,"avatar_url":"https://avatars.githubusercontent.com/u/286993?v=3","gravatar_id":"","url":"https://api.github.com/users/holidayextras","html_url":"https://github.com/holidayextras","followers_url":"https://api.github.com/users/holidayextras/followers","following_url":"https://api.github.com/users/holidayextras/following{/other_user}","gists_url":"https://api.github.com/users/holidayextras/gists{/gist_id}","starred_url":"https://api.github.com/users/holidayextras/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/holidayextras/subscriptions","organizations_url":"https://api.github.com/users/holidayextras/orgs","repos_url":"https://api.github.com/users/holidayextras/repos","events_url":"https://api.github.com/users/holidayextras/events{/privacy}","received_events_url":"https://api.github.com/users/holidayextras/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/holidayextras/jsonapi-store-relationaldb","description":"A relational database handler for jsonapi-server","fork":false,"url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb","forks_url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/forks","keys_url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/teams","hooks_url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/hooks","issue_events_url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/issues/events{/number}","events_url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/events","assignees_url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/assignees{/user}","branches_url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/branches{/branch}","tags_url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/tags","blobs_url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/git/refs{/sha}","trees_url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/statuses/{sha}","languages_url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/languages","stargazers_url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/stargazers","contributors_url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/contributors","subscribers_url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/subscribers","subscription_url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/subscription","commits_url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/commits{/sha}","git_commits_url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/git/commits{/sha}","comments_url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/comments{/number}","issue_comment_url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/issues/comments{/number}","contents_url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/contents/{+path}","compare_url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/merges","archive_url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/downloads","issues_url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/issues{/number}","pulls_url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/pulls{/number}","milestones_url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/milestones{/number}","notifications_url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/labels{/name}","releases_url":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/releases{/id}","created_at":"2015-11-19T13:57:30Z","updated_at":"2015-12-02T15:13:34Z","pushed_at":"2015-12-15T12:11:04Z","git_url":"git://github.com/holidayextras/jsonapi-store-relationaldb.git","ssh_url":"git@github.com:holidayextras/jsonapi-store-relationaldb.git","clone_url":"https://github.com/holidayextras/jsonapi-store-relationaldb.git","svn_url":"https://github.com/holidayextras/jsonapi-store-relationaldb","homepage":null,"size":25,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/pulls/15"},"html":{"href":"https://github.com/holidayextras/jsonapi-store-relationaldb/pull/15"},"issue":{"href":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/issues/15"},"comments":{"href":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/issues/15/comments"},"review_comments":{"href":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/pulls/15/comments"},"review_comment":{"href":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/pulls/15/commits"},"statuses":{"href":"https://api.github.com/repos/holidayextras/jsonapi-store-relationaldb/statuses/99ce7acebe4679d381d5d67c93797bfded3c6588"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":2,"additions":5,"deletions":2,"changed_files":3}}