{"action":"created","comment":{"url":"https://api.github.com/repos/ForestAdmin/lumber/pulls/comments/228828815","pull_request_review_id":169183523,"id":228828815,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyODgyODgxNQ==","diff_hunk":"@@ -35,30 +35,9 @@ program\n   ]);\n \n   const db = await new DB().connect(config);\n-  const queryInterface = db.getQueryInterface();\n-  const tableAnalyzer = new TableAnalyzer(queryInterface, config);\n+  const schema = new TableAnalyzer(db, config).perform();\n   const migrator = new Migrator(config);\n \n-  const schema = {};\n-\n-  // Build the db schema.\n-  await P.mapSeries(queryInterface.showAllTables({\n-    schema: config.dbSchema,\n-  }), async (table) => {\n-    // NOTICE: MS SQL returns objects instead of strings.\n-    // eslint-disable-next-line no-param-reassign\n-    if (typeof table === 'object') { table = table.tableName; }\n-\n-    const analysis = await tableAnalyzer.analyzeTable(table);\n-    schema[table] = { fields: analysis[0], references: analysis[1] };\n-  });\n-\n-  if (_.isEmpty(schema)) {\n-    console.log('💀  Oops, your database is empty. Please, ' +\n-      'create some tables before running Lumber update.💀');\n-    process.exit(1);\n-  }\n-","path":"lumber-update.js","position":28,"original_position":28,"commit_id":"5fb4b1d3af4138f513c00877160c5ca6d29def24","original_commit_id":"5fb4b1d3af4138f513c00877160c5ca6d29def24","user":{"login":"SeyZ","id":519129,"node_id":"MDQ6VXNlcjUxOTEyOQ==","avatar_url":"https://avatars1.githubusercontent.com/u/519129?v=4","gravatar_id":"","url":"https://api.github.com/users/SeyZ","html_url":"https://github.com/SeyZ","followers_url":"https://api.github.com/users/SeyZ/followers","following_url":"https://api.github.com/users/SeyZ/following{/other_user}","gists_url":"https://api.github.com/users/SeyZ/gists{/gist_id}","starred_url":"https://api.github.com/users/SeyZ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SeyZ/subscriptions","organizations_url":"https://api.github.com/users/SeyZ/orgs","repos_url":"https://api.github.com/users/SeyZ/repos","events_url":"https://api.github.com/users/SeyZ/events{/privacy}","received_events_url":"https://api.github.com/users/SeyZ/received_events","type":"User","site_admin":false},"body":"Same here. It avoids code duplication and this is not the responsibility of the command to deal with database stuff.","created_at":"2018-10-29T08:11:39Z","updated_at":"2018-10-29T08:11:39Z","html_url":"https://github.com/ForestAdmin/lumber/pull/176#discussion_r228828815","pull_request_url":"https://api.github.com/repos/ForestAdmin/lumber/pulls/176","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/ForestAdmin/lumber/pulls/comments/228828815"},"html":{"href":"https://github.com/ForestAdmin/lumber/pull/176#discussion_r228828815"},"pull_request":{"href":"https://api.github.com/repos/ForestAdmin/lumber/pulls/176"}}},"pull_request":{"url":"https://api.github.com/repos/ForestAdmin/lumber/pulls/176","id":226469664,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI2NDY5NjY0","html_url":"https://github.com/ForestAdmin/lumber/pull/176","diff_url":"https://github.com/ForestAdmin/lumber/pull/176.diff","patch_url":"https://github.com/ForestAdmin/lumber/pull/176.patch","issue_url":"https://api.github.com/repos/ForestAdmin/lumber/issues/176","number":176,"state":"open","locked":false,"title":"MongoDB support","user":{"login":"SeyZ","id":519129,"node_id":"MDQ6VXNlcjUxOTEyOQ==","avatar_url":"https://avatars1.githubusercontent.com/u/519129?v=4","gravatar_id":"","url":"https://api.github.com/users/SeyZ","html_url":"https://github.com/SeyZ","followers_url":"https://api.github.com/users/SeyZ/followers","following_url":"https://api.github.com/users/SeyZ/following{/other_user}","gists_url":"https://api.github.com/users/SeyZ/gists{/gist_id}","starred_url":"https://api.github.com/users/SeyZ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SeyZ/subscriptions","organizations_url":"https://api.github.com/users/SeyZ/orgs","repos_url":"https://api.github.com/users/SeyZ/repos","events_url":"https://api.github.com/users/SeyZ/events{/privacy}","received_events_url":"https://api.github.com/users/SeyZ/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-10-29T08:10:28Z","updated_at":"2018-10-29T08:11:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"286047467219d63b28bb1ca8b7f2313f9e3d6a47","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ForestAdmin/lumber/pulls/176/commits","review_comments_url":"https://api.github.com/repos/ForestAdmin/lumber/pulls/176/comments","review_comment_url":"https://api.github.com/repos/ForestAdmin/lumber/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ForestAdmin/lumber/issues/176/comments","statuses_url":"https://api.github.com/repos/ForestAdmin/lumber/statuses/5fb4b1d3af4138f513c00877160c5ca6d29def24","head":{"label":"ForestAdmin:feature/mongodb","ref":"feature/mongodb","sha":"5fb4b1d3af4138f513c00877160c5ca6d29def24","user":{"login":"ForestAdmin","id":13693804,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzNjkzODA0","avatar_url":"https://avatars2.githubusercontent.com/u/13693804?v=4","gravatar_id":"","url":"https://api.github.com/users/ForestAdmin","html_url":"https://github.com/ForestAdmin","followers_url":"https://api.github.com/users/ForestAdmin/followers","following_url":"https://api.github.com/users/ForestAdmin/following{/other_user}","gists_url":"https://api.github.com/users/ForestAdmin/gists{/gist_id}","starred_url":"https://api.github.com/users/ForestAdmin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ForestAdmin/subscriptions","organizations_url":"https://api.github.com/users/ForestAdmin/orgs","repos_url":"https://api.github.com/users/ForestAdmin/repos","events_url":"https://api.github.com/users/ForestAdmin/events{/privacy}","received_events_url":"https://api.github.com/users/ForestAdmin/received_events","type":"Organization","site_admin":false},"repo":{"id":72077868,"node_id":"MDEwOlJlcG9zaXRvcnk3MjA3Nzg2OA==","name":"lumber","full_name":"ForestAdmin/lumber","private":false,"owner":{"login":"ForestAdmin","id":13693804,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzNjkzODA0","avatar_url":"https://avatars2.githubusercontent.com/u/13693804?v=4","gravatar_id":"","url":"https://api.github.com/users/ForestAdmin","html_url":"https://github.com/ForestAdmin","followers_url":"https://api.github.com/users/ForestAdmin/followers","following_url":"https://api.github.com/users/ForestAdmin/following{/other_user}","gists_url":"https://api.github.com/users/ForestAdmin/gists{/gist_id}","starred_url":"https://api.github.com/users/ForestAdmin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ForestAdmin/subscriptions","organizations_url":"https://api.github.com/users/ForestAdmin/orgs","repos_url":"https://api.github.com/users/ForestAdmin/repos","events_url":"https://api.github.com/users/ForestAdmin/events{/privacy}","received_events_url":"https://api.github.com/users/ForestAdmin/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/ForestAdmin/lumber","description":"Generate the back office of your web application","fork":false,"url":"https://api.github.com/repos/ForestAdmin/lumber","forks_url":"https://api.github.com/repos/ForestAdmin/lumber/forks","keys_url":"https://api.github.com/repos/ForestAdmin/lumber/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ForestAdmin/lumber/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ForestAdmin/lumber/teams","hooks_url":"https://api.github.com/repos/ForestAdmin/lumber/hooks","issue_events_url":"https://api.github.com/repos/ForestAdmin/lumber/issues/events{/number}","events_url":"https://api.github.com/repos/ForestAdmin/lumber/events","assignees_url":"https://api.github.com/repos/ForestAdmin/lumber/assignees{/user}","branches_url":"https://api.github.com/repos/ForestAdmin/lumber/branches{/branch}","tags_url":"https://api.github.com/repos/ForestAdmin/lumber/tags","blobs_url":"https://api.github.com/repos/ForestAdmin/lumber/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ForestAdmin/lumber/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ForestAdmin/lumber/git/refs{/sha}","trees_url":"https://api.github.com/repos/ForestAdmin/lumber/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ForestAdmin/lumber/statuses/{sha}","languages_url":"https://api.github.com/repos/ForestAdmin/lumber/languages","stargazers_url":"https://api.github.com/repos/ForestAdmin/lumber/stargazers","contributors_url":"https://api.github.com/repos/ForestAdmin/lumber/contributors","subscribers_url":"https://api.github.com/repos/ForestAdmin/lumber/subscribers","subscription_url":"https://api.github.com/repos/ForestAdmin/lumber/subscription","commits_url":"https://api.github.com/repos/ForestAdmin/lumber/commits{/sha}","git_commits_url":"https://api.github.com/repos/ForestAdmin/lumber/git/commits{/sha}","comments_url":"https://api.github.com/repos/ForestAdmin/lumber/comments{/number}","issue_comment_url":"https://api.github.com/repos/ForestAdmin/lumber/issues/comments{/number}","contents_url":"https://api.github.com/repos/ForestAdmin/lumber/contents/{+path}","compare_url":"https://api.github.com/repos/ForestAdmin/lumber/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ForestAdmin/lumber/merges","archive_url":"https://api.github.com/repos/ForestAdmin/lumber/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ForestAdmin/lumber/downloads","issues_url":"https://api.github.com/repos/ForestAdmin/lumber/issues{/number}","pulls_url":"https://api.github.com/repos/ForestAdmin/lumber/pulls{/number}","milestones_url":"https://api.github.com/repos/ForestAdmin/lumber/milestones{/number}","notifications_url":"https://api.github.com/repos/ForestAdmin/lumber/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ForestAdmin/lumber/labels{/name}","releases_url":"https://api.github.com/repos/ForestAdmin/lumber/releases{/id}","deployments_url":"https://api.github.com/repos/ForestAdmin/lumber/deployments","created_at":"2016-10-27T06:27:52Z","updated_at":"2018-10-29T04:53:39Z","pushed_at":"2018-10-29T08:10:28Z","git_url":"git://github.com/ForestAdmin/lumber.git","ssh_url":"git@github.com:ForestAdmin/lumber.git","clone_url":"https://github.com/ForestAdmin/lumber.git","svn_url":"https://github.com/ForestAdmin/lumber","homepage":"https://forestadmin.gitbook.io/lumber","size":1689,"stargazers_count":1725,"watchers_count":1725,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":78,"mirror_url":null,"archived":false,"open_issues_count":29,"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":78,"open_issues":29,"watchers":1725,"default_branch":"master"}},"base":{"label":"ForestAdmin:master","ref":"master","sha":"5ff5d2f38b4ff339d1045b37890b95a7a6aec2ed","user":{"login":"ForestAdmin","id":13693804,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzNjkzODA0","avatar_url":"https://avatars2.githubusercontent.com/u/13693804?v=4","gravatar_id":"","url":"https://api.github.com/users/ForestAdmin","html_url":"https://github.com/ForestAdmin","followers_url":"https://api.github.com/users/ForestAdmin/followers","following_url":"https://api.github.com/users/ForestAdmin/following{/other_user}","gists_url":"https://api.github.com/users/ForestAdmin/gists{/gist_id}","starred_url":"https://api.github.com/users/ForestAdmin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ForestAdmin/subscriptions","organizations_url":"https://api.github.com/users/ForestAdmin/orgs","repos_url":"https://api.github.com/users/ForestAdmin/repos","events_url":"https://api.github.com/users/ForestAdmin/events{/privacy}","received_events_url":"https://api.github.com/users/ForestAdmin/received_events","type":"Organization","site_admin":false},"repo":{"id":72077868,"node_id":"MDEwOlJlcG9zaXRvcnk3MjA3Nzg2OA==","name":"lumber","full_name":"ForestAdmin/lumber","private":false,"owner":{"login":"ForestAdmin","id":13693804,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzNjkzODA0","avatar_url":"https://avatars2.githubusercontent.com/u/13693804?v=4","gravatar_id":"","url":"https://api.github.com/users/ForestAdmin","html_url":"https://github.com/ForestAdmin","followers_url":"https://api.github.com/users/ForestAdmin/followers","following_url":"https://api.github.com/users/ForestAdmin/following{/other_user}","gists_url":"https://api.github.com/users/ForestAdmin/gists{/gist_id}","starred_url":"https://api.github.com/users/ForestAdmin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ForestAdmin/subscriptions","organizations_url":"https://api.github.com/users/ForestAdmin/orgs","repos_url":"https://api.github.com/users/ForestAdmin/repos","events_url":"https://api.github.com/users/ForestAdmin/events{/privacy}","received_events_url":"https://api.github.com/users/ForestAdmin/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/ForestAdmin/lumber","description":"Generate the back office of your web application","fork":false,"url":"https://api.github.com/repos/ForestAdmin/lumber","forks_url":"https://api.github.com/repos/ForestAdmin/lumber/forks","keys_url":"https://api.github.com/repos/ForestAdmin/lumber/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ForestAdmin/lumber/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ForestAdmin/lumber/teams","hooks_url":"https://api.github.com/repos/ForestAdmin/lumber/hooks","issue_events_url":"https://api.github.com/repos/ForestAdmin/lumber/issues/events{/number}","events_url":"https://api.github.com/repos/ForestAdmin/lumber/events","assignees_url":"https://api.github.com/repos/ForestAdmin/lumber/assignees{/user}","branches_url":"https://api.github.com/repos/ForestAdmin/lumber/branches{/branch}","tags_url":"https://api.github.com/repos/ForestAdmin/lumber/tags","blobs_url":"https://api.github.com/repos/ForestAdmin/lumber/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ForestAdmin/lumber/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ForestAdmin/lumber/git/refs{/sha}","trees_url":"https://api.github.com/repos/ForestAdmin/lumber/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ForestAdmin/lumber/statuses/{sha}","languages_url":"https://api.github.com/repos/ForestAdmin/lumber/languages","stargazers_url":"https://api.github.com/repos/ForestAdmin/lumber/stargazers","contributors_url":"https://api.github.com/repos/ForestAdmin/lumber/contributors","subscribers_url":"https://api.github.com/repos/ForestAdmin/lumber/subscribers","subscription_url":"https://api.github.com/repos/ForestAdmin/lumber/subscription","commits_url":"https://api.github.com/repos/ForestAdmin/lumber/commits{/sha}","git_commits_url":"https://api.github.com/repos/ForestAdmin/lumber/git/commits{/sha}","comments_url":"https://api.github.com/repos/ForestAdmin/lumber/comments{/number}","issue_comment_url":"https://api.github.com/repos/ForestAdmin/lumber/issues/comments{/number}","contents_url":"https://api.github.com/repos/ForestAdmin/lumber/contents/{+path}","compare_url":"https://api.github.com/repos/ForestAdmin/lumber/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ForestAdmin/lumber/merges","archive_url":"https://api.github.com/repos/ForestAdmin/lumber/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ForestAdmin/lumber/downloads","issues_url":"https://api.github.com/repos/ForestAdmin/lumber/issues{/number}","pulls_url":"https://api.github.com/repos/ForestAdmin/lumber/pulls{/number}","milestones_url":"https://api.github.com/repos/ForestAdmin/lumber/milestones{/number}","notifications_url":"https://api.github.com/repos/ForestAdmin/lumber/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ForestAdmin/lumber/labels{/name}","releases_url":"https://api.github.com/repos/ForestAdmin/lumber/releases{/id}","deployments_url":"https://api.github.com/repos/ForestAdmin/lumber/deployments","created_at":"2016-10-27T06:27:52Z","updated_at":"2018-10-29T04:53:39Z","pushed_at":"2018-10-29T08:10:28Z","git_url":"git://github.com/ForestAdmin/lumber.git","ssh_url":"git@github.com:ForestAdmin/lumber.git","clone_url":"https://github.com/ForestAdmin/lumber.git","svn_url":"https://github.com/ForestAdmin/lumber","homepage":"https://forestadmin.gitbook.io/lumber","size":1689,"stargazers_count":1725,"watchers_count":1725,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":78,"mirror_url":null,"archived":false,"open_issues_count":29,"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":78,"open_issues":29,"watchers":1725,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ForestAdmin/lumber/pulls/176"},"html":{"href":"https://github.com/ForestAdmin/lumber/pull/176"},"issue":{"href":"https://api.github.com/repos/ForestAdmin/lumber/issues/176"},"comments":{"href":"https://api.github.com/repos/ForestAdmin/lumber/issues/176/comments"},"review_comments":{"href":"https://api.github.com/repos/ForestAdmin/lumber/pulls/176/comments"},"review_comment":{"href":"https://api.github.com/repos/ForestAdmin/lumber/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ForestAdmin/lumber/pulls/176/commits"},"statuses":{"href":"https://api.github.com/repos/ForestAdmin/lumber/statuses/5fb4b1d3af4138f513c00877160c5ca6d29def24"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"SeyZ"}}