{"action":"created","comment":{"url":"https://api.github.com/repos/ubccr/xdmod/pulls/comments/186841285","pull_request_review_id":118501533,"id":186841285,"diff_hunk":"@@ -115,22 +151,26 @@ protected function filterAndVerifyValue($property, $value)\n     }\n \n     /**\n-     * Auto-generate an index name based on the columns included in the index.\n-     * If the length of the index name would be too large use a hash.\n+     * Auto-generate a constraint name.\n+     *\n+     * If this is a foreign key constraint use the columns included in the\n+     * constraint.  If the length of the index name would be too large use a\n+     * hash.\n      *\n-     * @param array $columns The array of index column names\n+     * @param array $columns The array of constraint column names\n      *\n      * @return string The generated index name\n      */\n     private function generateConstraintName(array $columns)\n     {\n         $str = implode('_', $columns);\n         $name = ( strlen($str) <= 32 ? $str : md5($str) );\n+\n         return 'constraint_' . $name;\n     }\n \n     /**\n-     * Constraints are considered equal if all properties are the same.\n+     * Constraints are considered equal if all non-null properties are the same.","path":"classes/ETL/DbModel/ForeignKeyConstraint.php","position":null,"original_position":103,"commit_id":"766f3fb2bf2f91a6519f61eb8e85418619202017","original_commit_id":"766f3fb2bf2f91a6519f61eb8e85418619202017","user":{"login":"smgallo","id":2301909,"avatar_url":"https://avatars1.githubusercontent.com/u/2301909?v=4","gravatar_id":"","url":"https://api.github.com/users/smgallo","html_url":"https://github.com/smgallo","followers_url":"https://api.github.com/users/smgallo/followers","following_url":"https://api.github.com/users/smgallo/following{/other_user}","gists_url":"https://api.github.com/users/smgallo/gists{/gist_id}","starred_url":"https://api.github.com/users/smgallo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smgallo/subscriptions","organizations_url":"https://api.github.com/users/smgallo/orgs","repos_url":"https://api.github.com/users/smgallo/repos","events_url":"https://api.github.com/users/smgallo/events{/privacy}","received_events_url":"https://api.github.com/users/smgallo/received_events","type":"User","site_admin":false},"body":"Something that we'll need to deal with is keywords in different case because as it stands now (for all of the `DbModel` classes) \"FROM\" and \"from\" are considered different. Don't worry about it here, I'm going to think about how to handle it globally and change them all at once.","created_at":"2018-05-08T19:30:01Z","updated_at":"2018-05-08T19:31:55Z","html_url":"https://github.com/ubccr/xdmod/pull/531#discussion_r186841285","pull_request_url":"https://api.github.com/repos/ubccr/xdmod/pulls/531","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/ubccr/xdmod/pulls/comments/186841285"},"html":{"href":"https://github.com/ubccr/xdmod/pull/531#discussion_r186841285"},"pull_request":{"href":"https://api.github.com/repos/ubccr/xdmod/pulls/531"}}},"pull_request":{"url":"https://api.github.com/repos/ubccr/xdmod/pulls/531","id":186000721,"html_url":"https://github.com/ubccr/xdmod/pull/531","diff_url":"https://github.com/ubccr/xdmod/pull/531.diff","patch_url":"https://github.com/ubccr/xdmod/pull/531.patch","issue_url":"https://api.github.com/repos/ubccr/xdmod/issues/531","number":531,"state":"open","locked":false,"title":"Add foreign key constraints to ETL","user":{"login":"jtpalmer","id":328284,"avatar_url":"https://avatars3.githubusercontent.com/u/328284?v=4","gravatar_id":"","url":"https://api.github.com/users/jtpalmer","html_url":"https://github.com/jtpalmer","followers_url":"https://api.github.com/users/jtpalmer/followers","following_url":"https://api.github.com/users/jtpalmer/following{/other_user}","gists_url":"https://api.github.com/users/jtpalmer/gists{/gist_id}","starred_url":"https://api.github.com/users/jtpalmer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jtpalmer/subscriptions","organizations_url":"https://api.github.com/users/jtpalmer/orgs","repos_url":"https://api.github.com/users/jtpalmer/repos","events_url":"https://api.github.com/users/jtpalmer/events{/privacy}","received_events_url":"https://api.github.com/users/jtpalmer/received_events","type":"User","site_admin":false},"body":"<!--- Provide a general summary of your changes in the Title above -->\r\n\r\n## Description\r\n<!--- Describe your changes in detail -->\r\n<!--- Include screenshots for GUI changes if appropriate -->\r\n<!--- If any documentation outside of this repo needs to be added or updated,\r\n      please include links to the relevant docs and how they should be changed -->\r\n\r\nAdds foreign key constraint support to ETL.\r\n\r\n## Motivation and Context\r\n<!--- Why is this change required? What problem does it solve? -->\r\n<!--- If it fixes an open issue, please link to the issue here. -->\r\n\r\nTables in `mod_hpcdb` have foreign key constraints.  In order to improve job ingestion these tables should be managed by the ETL process.\r\n\r\n## Tests performed\r\n<!--- Please describe in detail how you tested your changes. -->\r\n<!--- Include details of your testing environment, and the tests you ran to -->\r\n<!--- see how your change affects other areas of the code, etc. -->\r\n\r\nUpdated ETL tests.\r\n\r\n## Types of changes\r\n<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [ ] Bug fix (non-breaking change which fixes an issue)\r\n- [x] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n\r\n## Checklist:\r\n<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->\r\n- [x] My code follows the code style of this project as found in the **CONTRIBUTING** document.\r\n- [x] I have added tests to cover my changes.\r\n- [x] All new and existing tests passed.\r\n","created_at":"2018-05-04T14:30:01Z","updated_at":"2018-05-08T19:31:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"115d6d651f4ea3c48fb26f7bd85bbdd2ec60428c","assignee":null,"assignees":[],"requested_reviewers":[{"login":"plessbd","id":683012,"avatar_url":"https://avatars2.githubusercontent.com/u/683012?v=4","gravatar_id":"","url":"https://api.github.com/users/plessbd","html_url":"https://github.com/plessbd","followers_url":"https://api.github.com/users/plessbd/followers","following_url":"https://api.github.com/users/plessbd/following{/other_user}","gists_url":"https://api.github.com/users/plessbd/gists{/gist_id}","starred_url":"https://api.github.com/users/plessbd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plessbd/subscriptions","organizations_url":"https://api.github.com/users/plessbd/orgs","repos_url":"https://api.github.com/users/plessbd/repos","events_url":"https://api.github.com/users/plessbd/events{/privacy}","received_events_url":"https://api.github.com/users/plessbd/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":553094712,"url":"https://api.github.com/repos/ubccr/xdmod/labels/ETL","name":"ETL","color":"c5def5","default":false},{"id":470896635,"url":"https://api.github.com/repos/ubccr/xdmod/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"milestone":{"url":"https://api.github.com/repos/ubccr/xdmod/milestones/8","html_url":"https://github.com/ubccr/xdmod/milestone/8","labels_url":"https://api.github.com/repos/ubccr/xdmod/milestones/8/labels","id":3075821,"number":8,"title":"8.0.0","description":"","creator":{"login":"smgallo","id":2301909,"avatar_url":"https://avatars1.githubusercontent.com/u/2301909?v=4","gravatar_id":"","url":"https://api.github.com/users/smgallo","html_url":"https://github.com/smgallo","followers_url":"https://api.github.com/users/smgallo/followers","following_url":"https://api.github.com/users/smgallo/following{/other_user}","gists_url":"https://api.github.com/users/smgallo/gists{/gist_id}","starred_url":"https://api.github.com/users/smgallo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smgallo/subscriptions","organizations_url":"https://api.github.com/users/smgallo/orgs","repos_url":"https://api.github.com/users/smgallo/repos","events_url":"https://api.github.com/users/smgallo/events{/privacy}","received_events_url":"https://api.github.com/users/smgallo/received_events","type":"User","site_admin":false},"open_issues":6,"closed_issues":48,"state":"open","created_at":"2018-01-30T18:52:17Z","updated_at":"2018-05-08T18:49:37Z","due_on":"2018-07-06T07:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/ubccr/xdmod/pulls/531/commits","review_comments_url":"https://api.github.com/repos/ubccr/xdmod/pulls/531/comments","review_comment_url":"https://api.github.com/repos/ubccr/xdmod/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ubccr/xdmod/issues/531/comments","statuses_url":"https://api.github.com/repos/ubccr/xdmod/statuses/766f3fb2bf2f91a6519f61eb8e85418619202017","head":{"label":"jtpalmer:etl-constraints","ref":"etl-constraints","sha":"766f3fb2bf2f91a6519f61eb8e85418619202017","user":{"login":"jtpalmer","id":328284,"avatar_url":"https://avatars3.githubusercontent.com/u/328284?v=4","gravatar_id":"","url":"https://api.github.com/users/jtpalmer","html_url":"https://github.com/jtpalmer","followers_url":"https://api.github.com/users/jtpalmer/followers","following_url":"https://api.github.com/users/jtpalmer/following{/other_user}","gists_url":"https://api.github.com/users/jtpalmer/gists{/gist_id}","starred_url":"https://api.github.com/users/jtpalmer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jtpalmer/subscriptions","organizations_url":"https://api.github.com/users/jtpalmer/orgs","repos_url":"https://api.github.com/users/jtpalmer/repos","events_url":"https://api.github.com/users/jtpalmer/events{/privacy}","received_events_url":"https://api.github.com/users/jtpalmer/received_events","type":"User","site_admin":false},"repo":{"id":78541815,"name":"xdmod","full_name":"jtpalmer/xdmod","owner":{"login":"jtpalmer","id":328284,"avatar_url":"https://avatars3.githubusercontent.com/u/328284?v=4","gravatar_id":"","url":"https://api.github.com/users/jtpalmer","html_url":"https://github.com/jtpalmer","followers_url":"https://api.github.com/users/jtpalmer/followers","following_url":"https://api.github.com/users/jtpalmer/following{/other_user}","gists_url":"https://api.github.com/users/jtpalmer/gists{/gist_id}","starred_url":"https://api.github.com/users/jtpalmer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jtpalmer/subscriptions","organizations_url":"https://api.github.com/users/jtpalmer/orgs","repos_url":"https://api.github.com/users/jtpalmer/repos","events_url":"https://api.github.com/users/jtpalmer/events{/privacy}","received_events_url":"https://api.github.com/users/jtpalmer/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jtpalmer/xdmod","description":"An open framework for collecting and analyzing HPC metrics.","fork":true,"url":"https://api.github.com/repos/jtpalmer/xdmod","forks_url":"https://api.github.com/repos/jtpalmer/xdmod/forks","keys_url":"https://api.github.com/repos/jtpalmer/xdmod/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jtpalmer/xdmod/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jtpalmer/xdmod/teams","hooks_url":"https://api.github.com/repos/jtpalmer/xdmod/hooks","issue_events_url":"https://api.github.com/repos/jtpalmer/xdmod/issues/events{/number}","events_url":"https://api.github.com/repos/jtpalmer/xdmod/events","assignees_url":"https://api.github.com/repos/jtpalmer/xdmod/assignees{/user}","branches_url":"https://api.github.com/repos/jtpalmer/xdmod/branches{/branch}","tags_url":"https://api.github.com/repos/jtpalmer/xdmod/tags","blobs_url":"https://api.github.com/repos/jtpalmer/xdmod/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jtpalmer/xdmod/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jtpalmer/xdmod/git/refs{/sha}","trees_url":"https://api.github.com/repos/jtpalmer/xdmod/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jtpalmer/xdmod/statuses/{sha}","languages_url":"https://api.github.com/repos/jtpalmer/xdmod/languages","stargazers_url":"https://api.github.com/repos/jtpalmer/xdmod/stargazers","contributors_url":"https://api.github.com/repos/jtpalmer/xdmod/contributors","subscribers_url":"https://api.github.com/repos/jtpalmer/xdmod/subscribers","subscription_url":"https://api.github.com/repos/jtpalmer/xdmod/subscription","commits_url":"https://api.github.com/repos/jtpalmer/xdmod/commits{/sha}","git_commits_url":"https://api.github.com/repos/jtpalmer/xdmod/git/commits{/sha}","comments_url":"https://api.github.com/repos/jtpalmer/xdmod/comments{/number}","issue_comment_url":"https://api.github.com/repos/jtpalmer/xdmod/issues/comments{/number}","contents_url":"https://api.github.com/repos/jtpalmer/xdmod/contents/{+path}","compare_url":"https://api.github.com/repos/jtpalmer/xdmod/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jtpalmer/xdmod/merges","archive_url":"https://api.github.com/repos/jtpalmer/xdmod/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jtpalmer/xdmod/downloads","issues_url":"https://api.github.com/repos/jtpalmer/xdmod/issues{/number}","pulls_url":"https://api.github.com/repos/jtpalmer/xdmod/pulls{/number}","milestones_url":"https://api.github.com/repos/jtpalmer/xdmod/milestones{/number}","notifications_url":"https://api.github.com/repos/jtpalmer/xdmod/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jtpalmer/xdmod/labels{/name}","releases_url":"https://api.github.com/repos/jtpalmer/xdmod/releases{/id}","deployments_url":"https://api.github.com/repos/jtpalmer/xdmod/deployments","created_at":"2017-01-10T14:37:10Z","updated_at":"2018-05-08T16:54:10Z","pushed_at":"2018-05-08T18:49:50Z","git_url":"git://github.com/jtpalmer/xdmod.git","ssh_url":"git@github.com:jtpalmer/xdmod.git","clone_url":"https://github.com/jtpalmer/xdmod.git","svn_url":"https://github.com/jtpalmer/xdmod","homepage":"http://open.xdmod.org","size":6635,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"lgpl-3.0","name":"GNU Lesser General Public License v3.0","spdx_id":"LGPL-3.0","url":"https://api.github.com/licenses/lgpl-3.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"xdmod8.0"}},"base":{"label":"ubccr:xdmod8.0","ref":"xdmod8.0","sha":"e2595e32f0873c5bf31b25c3bcd7f0ad329995fa","user":{"login":"ubccr","id":2301947,"avatar_url":"https://avatars2.githubusercontent.com/u/2301947?v=4","gravatar_id":"","url":"https://api.github.com/users/ubccr","html_url":"https://github.com/ubccr","followers_url":"https://api.github.com/users/ubccr/followers","following_url":"https://api.github.com/users/ubccr/following{/other_user}","gists_url":"https://api.github.com/users/ubccr/gists{/gist_id}","starred_url":"https://api.github.com/users/ubccr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ubccr/subscriptions","organizations_url":"https://api.github.com/users/ubccr/orgs","repos_url":"https://api.github.com/users/ubccr/repos","events_url":"https://api.github.com/users/ubccr/events{/privacy}","received_events_url":"https://api.github.com/users/ubccr/received_events","type":"Organization","site_admin":false},"repo":{"id":72233032,"name":"xdmod","full_name":"ubccr/xdmod","owner":{"login":"ubccr","id":2301947,"avatar_url":"https://avatars2.githubusercontent.com/u/2301947?v=4","gravatar_id":"","url":"https://api.github.com/users/ubccr","html_url":"https://github.com/ubccr","followers_url":"https://api.github.com/users/ubccr/followers","following_url":"https://api.github.com/users/ubccr/following{/other_user}","gists_url":"https://api.github.com/users/ubccr/gists{/gist_id}","starred_url":"https://api.github.com/users/ubccr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ubccr/subscriptions","organizations_url":"https://api.github.com/users/ubccr/orgs","repos_url":"https://api.github.com/users/ubccr/repos","events_url":"https://api.github.com/users/ubccr/events{/privacy}","received_events_url":"https://api.github.com/users/ubccr/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ubccr/xdmod","description":"An open framework for collecting and analyzing HPC metrics.","fork":false,"url":"https://api.github.com/repos/ubccr/xdmod","forks_url":"https://api.github.com/repos/ubccr/xdmod/forks","keys_url":"https://api.github.com/repos/ubccr/xdmod/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ubccr/xdmod/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ubccr/xdmod/teams","hooks_url":"https://api.github.com/repos/ubccr/xdmod/hooks","issue_events_url":"https://api.github.com/repos/ubccr/xdmod/issues/events{/number}","events_url":"https://api.github.com/repos/ubccr/xdmod/events","assignees_url":"https://api.github.com/repos/ubccr/xdmod/assignees{/user}","branches_url":"https://api.github.com/repos/ubccr/xdmod/branches{/branch}","tags_url":"https://api.github.com/repos/ubccr/xdmod/tags","blobs_url":"https://api.github.com/repos/ubccr/xdmod/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ubccr/xdmod/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ubccr/xdmod/git/refs{/sha}","trees_url":"https://api.github.com/repos/ubccr/xdmod/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ubccr/xdmod/statuses/{sha}","languages_url":"https://api.github.com/repos/ubccr/xdmod/languages","stargazers_url":"https://api.github.com/repos/ubccr/xdmod/stargazers","contributors_url":"https://api.github.com/repos/ubccr/xdmod/contributors","subscribers_url":"https://api.github.com/repos/ubccr/xdmod/subscribers","subscription_url":"https://api.github.com/repos/ubccr/xdmod/subscription","commits_url":"https://api.github.com/repos/ubccr/xdmod/commits{/sha}","git_commits_url":"https://api.github.com/repos/ubccr/xdmod/git/commits{/sha}","comments_url":"https://api.github.com/repos/ubccr/xdmod/comments{/number}","issue_comment_url":"https://api.github.com/repos/ubccr/xdmod/issues/comments{/number}","contents_url":"https://api.github.com/repos/ubccr/xdmod/contents/{+path}","compare_url":"https://api.github.com/repos/ubccr/xdmod/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ubccr/xdmod/merges","archive_url":"https://api.github.com/repos/ubccr/xdmod/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ubccr/xdmod/downloads","issues_url":"https://api.github.com/repos/ubccr/xdmod/issues{/number}","pulls_url":"https://api.github.com/repos/ubccr/xdmod/pulls{/number}","milestones_url":"https://api.github.com/repos/ubccr/xdmod/milestones{/number}","notifications_url":"https://api.github.com/repos/ubccr/xdmod/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ubccr/xdmod/labels{/name}","releases_url":"https://api.github.com/repos/ubccr/xdmod/releases{/id}","deployments_url":"https://api.github.com/repos/ubccr/xdmod/deployments","created_at":"2016-10-28T18:41:25Z","updated_at":"2018-05-08T18:55:33Z","pushed_at":"2018-05-08T18:55:31Z","git_url":"git://github.com/ubccr/xdmod.git","ssh_url":"git@github.com:ubccr/xdmod.git","clone_url":"https://github.com/ubccr/xdmod.git","svn_url":"https://github.com/ubccr/xdmod","homepage":"https://open.xdmod.org","size":6656,"stargazers_count":27,"watchers_count":27,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":26,"mirror_url":null,"archived":false,"open_issues_count":10,"license":{"key":"lgpl-3.0","name":"GNU Lesser General Public License v3.0","spdx_id":"LGPL-3.0","url":"https://api.github.com/licenses/lgpl-3.0"},"forks":26,"open_issues":10,"watchers":27,"default_branch":"xdmod8.0"}},"_links":{"self":{"href":"https://api.github.com/repos/ubccr/xdmod/pulls/531"},"html":{"href":"https://github.com/ubccr/xdmod/pull/531"},"issue":{"href":"https://api.github.com/repos/ubccr/xdmod/issues/531"},"comments":{"href":"https://api.github.com/repos/ubccr/xdmod/issues/531/comments"},"review_comments":{"href":"https://api.github.com/repos/ubccr/xdmod/pulls/531/comments"},"review_comment":{"href":"https://api.github.com/repos/ubccr/xdmod/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ubccr/xdmod/pulls/531/commits"},"statuses":{"href":"https://api.github.com/repos/ubccr/xdmod/statuses/766f3fb2bf2f91a6519f61eb8e85418619202017"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"smgallo"}}