{"action":"created","comment":{"url":"https://api.github.com/repos/big-neon/bn-db/pulls/comments/201672283","pull_request_review_id":136217792,"id":201672283,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMTY3MjI4Mw==","diff_hunk":"@@ -0,0 +1,47 @@\n+#[macro_use]\n+extern crate diesel_migrations;\n+extern crate clap;\n+extern crate diesel;\n+\n+embed_migrations!(\"./migrations\");\n+\n+use clap::{App, Arg, SubCommand};\n+use diesel::pg::PgConnection;\n+use diesel::Connection;\n+\n+pub fn main() {\n+    let matches = App::new(\"Big Neon DB CLI\")\n+        .author(\"Big Neon\")\n+        .about(\"Command Line Interface for creating and migrating the Big Neon database\")\n+        .subcommand(\n+            SubCommand::with_name(\"migrate\")\n+                .about(\"migrates the database to the latest version\")\n+                .arg(\n+                    Arg::with_name(\"connection\")\n+                        .short(\"c\")\n+                        .takes_value(true)\n+                        .help(\"connection string to the database\"),\n+                ),\n+        )\n+        .get_matches();\n+\n+    if let Some(matches) = matches.subcommand_matches(\"migrate\") {\n+        println!(\"Migrating database\");\n+        let conn_string = matches.value_of(\"connection\").unwrap();","path":"src/bin.rs","position":30,"original_position":30,"commit_id":"66448a11a911524f95f17206621202580ddb94ae","original_commit_id":"66448a11a911524f95f17206621202580ddb94ae","user":{"login":"CjS77","id":7573551,"node_id":"MDQ6VXNlcjc1NzM1NTE=","avatar_url":"https://avatars2.githubusercontent.com/u/7573551?v=4","gravatar_id":"","url":"https://api.github.com/users/CjS77","html_url":"https://github.com/CjS77","followers_url":"https://api.github.com/users/CjS77/followers","following_url":"https://api.github.com/users/CjS77/following{/other_user}","gists_url":"https://api.github.com/users/CjS77/gists{/gist_id}","starred_url":"https://api.github.com/users/CjS77/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CjS77/subscriptions","organizations_url":"https://api.github.com/users/CjS77/orgs","repos_url":"https://api.github.com/users/CjS77/repos","events_url":"https://api.github.com/users/CjS77/events{/privacy}","received_events_url":"https://api.github.com/users/CjS77/received_events","type":"User","site_admin":false},"body":"This can panic here. Is that ok?","created_at":"2018-07-11T12:35:09Z","updated_at":"2018-07-11T12:38:22Z","html_url":"https://github.com/big-neon/bn-db/pull/20#discussion_r201672283","pull_request_url":"https://api.github.com/repos/big-neon/bn-db/pulls/20","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/big-neon/bn-db/pulls/comments/201672283"},"html":{"href":"https://github.com/big-neon/bn-db/pull/20#discussion_r201672283"},"pull_request":{"href":"https://api.github.com/repos/big-neon/bn-db/pulls/20"}}},"pull_request":{"url":"https://api.github.com/repos/big-neon/bn-db/pulls/20","id":200676303,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAwNjc2MzAz","html_url":"https://github.com/big-neon/bn-db/pull/20","diff_url":"https://github.com/big-neon/bn-db/pull/20.diff","patch_url":"https://github.com/big-neon/bn-db/pull/20.patch","issue_url":"https://api.github.com/repos/big-neon/bn-db/issues/20","number":20,"state":"open","locked":false,"title":"Create utility to execute migrations","user":{"login":"mikethetike","id":4200336,"node_id":"MDQ6VXNlcjQyMDAzMzY=","avatar_url":"https://avatars3.githubusercontent.com/u/4200336?v=4","gravatar_id":"","url":"https://api.github.com/users/mikethetike","html_url":"https://github.com/mikethetike","followers_url":"https://api.github.com/users/mikethetike/followers","following_url":"https://api.github.com/users/mikethetike/following{/other_user}","gists_url":"https://api.github.com/users/mikethetike/gists{/gist_id}","starred_url":"https://api.github.com/users/mikethetike/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikethetike/subscriptions","organizations_url":"https://api.github.com/users/mikethetike/orgs","repos_url":"https://api.github.com/users/mikethetike/repos","events_url":"https://api.github.com/users/mikethetike/events{/privacy}","received_events_url":"https://api.github.com/users/mikethetike/received_events","type":"User","site_admin":false},"body":"Created a binary that can be called via \r\n`bndb_cli migrate -c \"postgres://postgres:password123@localhost/bigneon-test\"`\r\nThis will enable us to create the database in other projects without having to find the source migrations.","created_at":"2018-07-11T11:59:42Z","updated_at":"2018-07-11T12:38:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[{"login":"Timo614","id":1319304,"node_id":"MDQ6VXNlcjEzMTkzMDQ=","avatar_url":"https://avatars1.githubusercontent.com/u/1319304?v=4","gravatar_id":"","url":"https://api.github.com/users/Timo614","html_url":"https://github.com/Timo614","followers_url":"https://api.github.com/users/Timo614/followers","following_url":"https://api.github.com/users/Timo614/following{/other_user}","gists_url":"https://api.github.com/users/Timo614/gists{/gist_id}","starred_url":"https://api.github.com/users/Timo614/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Timo614/subscriptions","organizations_url":"https://api.github.com/users/Timo614/orgs","repos_url":"https://api.github.com/users/Timo614/repos","events_url":"https://api.github.com/users/Timo614/events{/privacy}","received_events_url":"https://api.github.com/users/Timo614/received_events","type":"User","site_admin":false},{"login":"SWvheerden","id":2579813,"node_id":"MDQ6VXNlcjI1Nzk4MTM=","avatar_url":"https://avatars2.githubusercontent.com/u/2579813?v=4","gravatar_id":"","url":"https://api.github.com/users/SWvheerden","html_url":"https://github.com/SWvheerden","followers_url":"https://api.github.com/users/SWvheerden/followers","following_url":"https://api.github.com/users/SWvheerden/following{/other_user}","gists_url":"https://api.github.com/users/SWvheerden/gists{/gist_id}","starred_url":"https://api.github.com/users/SWvheerden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SWvheerden/subscriptions","organizations_url":"https://api.github.com/users/SWvheerden/orgs","repos_url":"https://api.github.com/users/SWvheerden/repos","events_url":"https://api.github.com/users/SWvheerden/events{/privacy}","received_events_url":"https://api.github.com/users/SWvheerden/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/big-neon/bn-db/pulls/20/commits","review_comments_url":"https://api.github.com/repos/big-neon/bn-db/pulls/20/comments","review_comment_url":"https://api.github.com/repos/big-neon/bn-db/pulls/comments{/number}","comments_url":"https://api.github.com/repos/big-neon/bn-db/issues/20/comments","statuses_url":"https://api.github.com/repos/big-neon/bn-db/statuses/66448a11a911524f95f17206621202580ddb94ae","head":{"label":"big-neon:mikethetike-create-bin-for-migrations","ref":"mikethetike-create-bin-for-migrations","sha":"66448a11a911524f95f17206621202580ddb94ae","user":{"login":"big-neon","id":37087976,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM3MDg3OTc2","avatar_url":"https://avatars1.githubusercontent.com/u/37087976?v=4","gravatar_id":"","url":"https://api.github.com/users/big-neon","html_url":"https://github.com/big-neon","followers_url":"https://api.github.com/users/big-neon/followers","following_url":"https://api.github.com/users/big-neon/following{/other_user}","gists_url":"https://api.github.com/users/big-neon/gists{/gist_id}","starred_url":"https://api.github.com/users/big-neon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/big-neon/subscriptions","organizations_url":"https://api.github.com/users/big-neon/orgs","repos_url":"https://api.github.com/users/big-neon/repos","events_url":"https://api.github.com/users/big-neon/events{/privacy}","received_events_url":"https://api.github.com/users/big-neon/received_events","type":"Organization","site_admin":false},"repo":{"id":136637247,"node_id":"MDEwOlJlcG9zaXRvcnkxMzY2MzcyNDc=","name":"bn-db","full_name":"big-neon/bn-db","owner":{"login":"big-neon","id":37087976,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM3MDg3OTc2","avatar_url":"https://avatars1.githubusercontent.com/u/37087976?v=4","gravatar_id":"","url":"https://api.github.com/users/big-neon","html_url":"https://github.com/big-neon","followers_url":"https://api.github.com/users/big-neon/followers","following_url":"https://api.github.com/users/big-neon/following{/other_user}","gists_url":"https://api.github.com/users/big-neon/gists{/gist_id}","starred_url":"https://api.github.com/users/big-neon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/big-neon/subscriptions","organizations_url":"https://api.github.com/users/big-neon/orgs","repos_url":"https://api.github.com/users/big-neon/repos","events_url":"https://api.github.com/users/big-neon/events{/privacy}","received_events_url":"https://api.github.com/users/big-neon/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/big-neon/bn-db","description":"The Big Neon User Database and API interface","fork":false,"url":"https://api.github.com/repos/big-neon/bn-db","forks_url":"https://api.github.com/repos/big-neon/bn-db/forks","keys_url":"https://api.github.com/repos/big-neon/bn-db/keys{/key_id}","collaborators_url":"https://api.github.com/repos/big-neon/bn-db/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/big-neon/bn-db/teams","hooks_url":"https://api.github.com/repos/big-neon/bn-db/hooks","issue_events_url":"https://api.github.com/repos/big-neon/bn-db/issues/events{/number}","events_url":"https://api.github.com/repos/big-neon/bn-db/events","assignees_url":"https://api.github.com/repos/big-neon/bn-db/assignees{/user}","branches_url":"https://api.github.com/repos/big-neon/bn-db/branches{/branch}","tags_url":"https://api.github.com/repos/big-neon/bn-db/tags","blobs_url":"https://api.github.com/repos/big-neon/bn-db/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/big-neon/bn-db/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/big-neon/bn-db/git/refs{/sha}","trees_url":"https://api.github.com/repos/big-neon/bn-db/git/trees{/sha}","statuses_url":"https://api.github.com/repos/big-neon/bn-db/statuses/{sha}","languages_url":"https://api.github.com/repos/big-neon/bn-db/languages","stargazers_url":"https://api.github.com/repos/big-neon/bn-db/stargazers","contributors_url":"https://api.github.com/repos/big-neon/bn-db/contributors","subscribers_url":"https://api.github.com/repos/big-neon/bn-db/subscribers","subscription_url":"https://api.github.com/repos/big-neon/bn-db/subscription","commits_url":"https://api.github.com/repos/big-neon/bn-db/commits{/sha}","git_commits_url":"https://api.github.com/repos/big-neon/bn-db/git/commits{/sha}","comments_url":"https://api.github.com/repos/big-neon/bn-db/comments{/number}","issue_comment_url":"https://api.github.com/repos/big-neon/bn-db/issues/comments{/number}","contents_url":"https://api.github.com/repos/big-neon/bn-db/contents/{+path}","compare_url":"https://api.github.com/repos/big-neon/bn-db/compare/{base}...{head}","merges_url":"https://api.github.com/repos/big-neon/bn-db/merges","archive_url":"https://api.github.com/repos/big-neon/bn-db/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/big-neon/bn-db/downloads","issues_url":"https://api.github.com/repos/big-neon/bn-db/issues{/number}","pulls_url":"https://api.github.com/repos/big-neon/bn-db/pulls{/number}","milestones_url":"https://api.github.com/repos/big-neon/bn-db/milestones{/number}","notifications_url":"https://api.github.com/repos/big-neon/bn-db/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/big-neon/bn-db/labels{/name}","releases_url":"https://api.github.com/repos/big-neon/bn-db/releases{/id}","deployments_url":"https://api.github.com/repos/big-neon/bn-db/deployments","created_at":"2018-06-08T15:36:21Z","updated_at":"2018-07-10T13:01:40Z","pushed_at":"2018-07-11T12:11:00Z","git_url":"git://github.com/big-neon/bn-db.git","ssh_url":"git@github.com:big-neon/bn-db.git","clone_url":"https://github.com/big-neon/bn-db.git","svn_url":"https://github.com/big-neon/bn-db","homepage":null,"size":81,"stargazers_count":0,"watchers_count":0,"language":"Rust","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":4,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":1,"open_issues":4,"watchers":0,"default_branch":"master"}},"base":{"label":"big-neon:master","ref":"master","sha":"137db862bf2aa49e6ead1ace45fdf3508414e53a","user":{"login":"big-neon","id":37087976,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM3MDg3OTc2","avatar_url":"https://avatars1.githubusercontent.com/u/37087976?v=4","gravatar_id":"","url":"https://api.github.com/users/big-neon","html_url":"https://github.com/big-neon","followers_url":"https://api.github.com/users/big-neon/followers","following_url":"https://api.github.com/users/big-neon/following{/other_user}","gists_url":"https://api.github.com/users/big-neon/gists{/gist_id}","starred_url":"https://api.github.com/users/big-neon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/big-neon/subscriptions","organizations_url":"https://api.github.com/users/big-neon/orgs","repos_url":"https://api.github.com/users/big-neon/repos","events_url":"https://api.github.com/users/big-neon/events{/privacy}","received_events_url":"https://api.github.com/users/big-neon/received_events","type":"Organization","site_admin":false},"repo":{"id":136637247,"node_id":"MDEwOlJlcG9zaXRvcnkxMzY2MzcyNDc=","name":"bn-db","full_name":"big-neon/bn-db","owner":{"login":"big-neon","id":37087976,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM3MDg3OTc2","avatar_url":"https://avatars1.githubusercontent.com/u/37087976?v=4","gravatar_id":"","url":"https://api.github.com/users/big-neon","html_url":"https://github.com/big-neon","followers_url":"https://api.github.com/users/big-neon/followers","following_url":"https://api.github.com/users/big-neon/following{/other_user}","gists_url":"https://api.github.com/users/big-neon/gists{/gist_id}","starred_url":"https://api.github.com/users/big-neon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/big-neon/subscriptions","organizations_url":"https://api.github.com/users/big-neon/orgs","repos_url":"https://api.github.com/users/big-neon/repos","events_url":"https://api.github.com/users/big-neon/events{/privacy}","received_events_url":"https://api.github.com/users/big-neon/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/big-neon/bn-db","description":"The Big Neon User Database and API interface","fork":false,"url":"https://api.github.com/repos/big-neon/bn-db","forks_url":"https://api.github.com/repos/big-neon/bn-db/forks","keys_url":"https://api.github.com/repos/big-neon/bn-db/keys{/key_id}","collaborators_url":"https://api.github.com/repos/big-neon/bn-db/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/big-neon/bn-db/teams","hooks_url":"https://api.github.com/repos/big-neon/bn-db/hooks","issue_events_url":"https://api.github.com/repos/big-neon/bn-db/issues/events{/number}","events_url":"https://api.github.com/repos/big-neon/bn-db/events","assignees_url":"https://api.github.com/repos/big-neon/bn-db/assignees{/user}","branches_url":"https://api.github.com/repos/big-neon/bn-db/branches{/branch}","tags_url":"https://api.github.com/repos/big-neon/bn-db/tags","blobs_url":"https://api.github.com/repos/big-neon/bn-db/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/big-neon/bn-db/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/big-neon/bn-db/git/refs{/sha}","trees_url":"https://api.github.com/repos/big-neon/bn-db/git/trees{/sha}","statuses_url":"https://api.github.com/repos/big-neon/bn-db/statuses/{sha}","languages_url":"https://api.github.com/repos/big-neon/bn-db/languages","stargazers_url":"https://api.github.com/repos/big-neon/bn-db/stargazers","contributors_url":"https://api.github.com/repos/big-neon/bn-db/contributors","subscribers_url":"https://api.github.com/repos/big-neon/bn-db/subscribers","subscription_url":"https://api.github.com/repos/big-neon/bn-db/subscription","commits_url":"https://api.github.com/repos/big-neon/bn-db/commits{/sha}","git_commits_url":"https://api.github.com/repos/big-neon/bn-db/git/commits{/sha}","comments_url":"https://api.github.com/repos/big-neon/bn-db/comments{/number}","issue_comment_url":"https://api.github.com/repos/big-neon/bn-db/issues/comments{/number}","contents_url":"https://api.github.com/repos/big-neon/bn-db/contents/{+path}","compare_url":"https://api.github.com/repos/big-neon/bn-db/compare/{base}...{head}","merges_url":"https://api.github.com/repos/big-neon/bn-db/merges","archive_url":"https://api.github.com/repos/big-neon/bn-db/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/big-neon/bn-db/downloads","issues_url":"https://api.github.com/repos/big-neon/bn-db/issues{/number}","pulls_url":"https://api.github.com/repos/big-neon/bn-db/pulls{/number}","milestones_url":"https://api.github.com/repos/big-neon/bn-db/milestones{/number}","notifications_url":"https://api.github.com/repos/big-neon/bn-db/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/big-neon/bn-db/labels{/name}","releases_url":"https://api.github.com/repos/big-neon/bn-db/releases{/id}","deployments_url":"https://api.github.com/repos/big-neon/bn-db/deployments","created_at":"2018-06-08T15:36:21Z","updated_at":"2018-07-10T13:01:40Z","pushed_at":"2018-07-11T12:11:00Z","git_url":"git://github.com/big-neon/bn-db.git","ssh_url":"git@github.com:big-neon/bn-db.git","clone_url":"https://github.com/big-neon/bn-db.git","svn_url":"https://github.com/big-neon/bn-db","homepage":null,"size":81,"stargazers_count":0,"watchers_count":0,"language":"Rust","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":4,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":1,"open_issues":4,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/big-neon/bn-db/pulls/20"},"html":{"href":"https://github.com/big-neon/bn-db/pull/20"},"issue":{"href":"https://api.github.com/repos/big-neon/bn-db/issues/20"},"comments":{"href":"https://api.github.com/repos/big-neon/bn-db/issues/20/comments"},"review_comments":{"href":"https://api.github.com/repos/big-neon/bn-db/pulls/20/comments"},"review_comment":{"href":"https://api.github.com/repos/big-neon/bn-db/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/big-neon/bn-db/pulls/20/commits"},"statuses":{"href":"https://api.github.com/repos/big-neon/bn-db/statuses/66448a11a911524f95f17206621202580ddb94ae"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"CjS77"}}