{"action":"created","comment":{"url":"https://api.github.com/repos/citusdata/citus/pulls/comments/84240459","pull_request_review_id":5029178,"id":84240459,"diff_hunk":"@@ -281,23 +282,31 @@ CopyShardPlacement(int64 shardId, char *sourceNodeName, int32 sourceNodePort,\n \tList *colocatedShardList = ColocatedShardIntervalList(shardInterval);\n \tListCell *colocatedShardCell = NULL;\n \tList *ddlCommandList = NIL;\n+\tList *foreignConstraintCommandList = NIL;\n \tchar *nodeUser = CitusExtensionOwnerName();\n \n \tforeach(colocatedShardCell, colocatedShardList)\n \t{\n \t\tShardInterval *colocatedShard = (ShardInterval *) lfirst(colocatedShardCell);\n \t\tList *colocatedShardDdlList = NIL;\n+\t\tList *shardForeignConstraintCommandList = NIL;\n \n \t\tcolocatedShardDdlList = CopyShardCommandList(colocatedShard, sourceNodeName,\n \t\t\t\t\t\t\t\t\t\t\t\t\t sourceNodePort);\n+\t\tshardForeignConstraintCommandList = CopyShardForeignConstraintCommandList(\n+\t\t\tcolocatedShard);\n \n \t\tddlCommandList = list_concat(ddlCommandList, colocatedShardDdlList);\n+\t\tforeignConstraintCommandList = list_concat(foreignConstraintCommandList,","path":"src/backend/distributed/master/master_repair_shards.c","position":27,"original_position":27,"commit_id":"a6de5099f000a20441e620a183f65144871248c9","original_commit_id":"a6de5099f000a20441e620a183f65144871248c9","user":{"login":"marcocitus","id":7127240,"avatar_url":"https://avatars.githubusercontent.com/u/7127240?v=3","gravatar_id":"","url":"https://api.github.com/users/marcocitus","html_url":"https://github.com/marcocitus","followers_url":"https://api.github.com/users/marcocitus/followers","following_url":"https://api.github.com/users/marcocitus/following{/other_user}","gists_url":"https://api.github.com/users/marcocitus/gists{/gist_id}","starred_url":"https://api.github.com/users/marcocitus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcocitus/subscriptions","organizations_url":"https://api.github.com/users/marcocitus/orgs","repos_url":"https://api.github.com/users/marcocitus/repos","events_url":"https://api.github.com/users/marcocitus/events{/privacy}","received_events_url":"https://api.github.com/users/marcocitus/received_events","type":"User","site_admin":false},"body":"Wouldn't this have to be after all co-located tables were created?","created_at":"2016-10-20T09:08:04Z","updated_at":"2016-10-20T09:08:04Z","html_url":"https://github.com/citusdata/citus/pull/888#discussion_r84240459","pull_request_url":"https://api.github.com/repos/citusdata/citus/pulls/888","_links":{"self":{"href":"https://api.github.com/repos/citusdata/citus/pulls/comments/84240459"},"html":{"href":"https://github.com/citusdata/citus/pull/888#discussion_r84240459"},"pull_request":{"href":"https://api.github.com/repos/citusdata/citus/pulls/888"}}},"pull_request":{"url":"https://api.github.com/repos/citusdata/citus/pulls/888","id":89995395,"html_url":"https://github.com/citusdata/citus/pull/888","diff_url":"https://github.com/citusdata/citus/pull/888.diff","patch_url":"https://github.com/citusdata/citus/pull/888.patch","issue_url":"https://api.github.com/repos/citusdata/citus/issues/888","number":888,"state":"open","locked":false,"title":"Foreign key support for create table","user":{"login":"byucesoy","id":2082070,"avatar_url":"https://avatars.githubusercontent.com/u/2082070?v=3","gravatar_id":"","url":"https://api.github.com/users/byucesoy","html_url":"https://github.com/byucesoy","followers_url":"https://api.github.com/users/byucesoy/followers","following_url":"https://api.github.com/users/byucesoy/following{/other_user}","gists_url":"https://api.github.com/users/byucesoy/gists{/gist_id}","starred_url":"https://api.github.com/users/byucesoy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/byucesoy/subscriptions","organizations_url":"https://api.github.com/users/byucesoy/orgs","repos_url":"https://api.github.com/users/byucesoy/repos","events_url":"https://api.github.com/users/byucesoy/events{/privacy}","received_events_url":"https://api.github.com/users/byucesoy/received_events","type":"User","site_admin":false},"body":"Foreign Constraint Support for create_distributed_table and shard move\r\n\r\nWith this change, we now push down foreign key constraints created during CREATE TABLE\r\nstatements. We also start to send foreign constraints during shard move along with\r\nother DDL statements\r\n\r\nThis changes made over add_create_distributed_table branch. So first few commits are not belong to this PR. Reviewer only needs to check the final commit.","created_at":"2016-10-19T12:04:24Z","updated_at":"2016-10-20T09:08:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"26724ab2ab46609f5af64a9e7b3855920d8ec923","assignee":{"login":"marcocitus","id":7127240,"avatar_url":"https://avatars.githubusercontent.com/u/7127240?v=3","gravatar_id":"","url":"https://api.github.com/users/marcocitus","html_url":"https://github.com/marcocitus","followers_url":"https://api.github.com/users/marcocitus/followers","following_url":"https://api.github.com/users/marcocitus/following{/other_user}","gists_url":"https://api.github.com/users/marcocitus/gists{/gist_id}","starred_url":"https://api.github.com/users/marcocitus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcocitus/subscriptions","organizations_url":"https://api.github.com/users/marcocitus/orgs","repos_url":"https://api.github.com/users/marcocitus/repos","events_url":"https://api.github.com/users/marcocitus/events{/privacy}","received_events_url":"https://api.github.com/users/marcocitus/received_events","type":"User","site_admin":false},"assignees":[{"login":"marcocitus","id":7127240,"avatar_url":"https://avatars.githubusercontent.com/u/7127240?v=3","gravatar_id":"","url":"https://api.github.com/users/marcocitus","html_url":"https://github.com/marcocitus","followers_url":"https://api.github.com/users/marcocitus/followers","following_url":"https://api.github.com/users/marcocitus/following{/other_user}","gists_url":"https://api.github.com/users/marcocitus/gists{/gist_id}","starred_url":"https://api.github.com/users/marcocitus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcocitus/subscriptions","organizations_url":"https://api.github.com/users/marcocitus/orgs","repos_url":"https://api.github.com/users/marcocitus/repos","events_url":"https://api.github.com/users/marcocitus/events{/privacy}","received_events_url":"https://api.github.com/users/marcocitus/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/citusdata/citus/milestones/6","html_url":"https://github.com/citusdata/citus/milestones/6.0%20Release","labels_url":"https://api.github.com/repos/citusdata/citus/milestones/6/labels","id":1900278,"number":6,"title":"6.0 Release","description":"Citus 6.0 Release","creator":{"login":"ozgune","id":2545443,"avatar_url":"https://avatars.githubusercontent.com/u/2545443?v=3","gravatar_id":"","url":"https://api.github.com/users/ozgune","html_url":"https://github.com/ozgune","followers_url":"https://api.github.com/users/ozgune/followers","following_url":"https://api.github.com/users/ozgune/following{/other_user}","gists_url":"https://api.github.com/users/ozgune/gists{/gist_id}","starred_url":"https://api.github.com/users/ozgune/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ozgune/subscriptions","organizations_url":"https://api.github.com/users/ozgune/orgs","repos_url":"https://api.github.com/users/ozgune/repos","events_url":"https://api.github.com/users/ozgune/events{/privacy}","received_events_url":"https://api.github.com/users/ozgune/received_events","type":"User","site_admin":false},"open_issues":14,"closed_issues":28,"state":"open","created_at":"2016-07-23T19:01:37Z","updated_at":"2016-10-20T08:43:26Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/citusdata/citus/pulls/888/commits","review_comments_url":"https://api.github.com/repos/citusdata/citus/pulls/888/comments","review_comment_url":"https://api.github.com/repos/citusdata/citus/pulls/comments{/number}","comments_url":"https://api.github.com/repos/citusdata/citus/issues/888/comments","statuses_url":"https://api.github.com/repos/citusdata/citus/statuses/a6de5099f000a20441e620a183f65144871248c9","head":{"label":"citusdata:foreign_key_support_for_create_table","ref":"foreign_key_support_for_create_table","sha":"a6de5099f000a20441e620a183f65144871248c9","user":{"login":"citusdata","id":2545424,"avatar_url":"https://avatars.githubusercontent.com/u/2545424?v=3","gravatar_id":"","url":"https://api.github.com/users/citusdata","html_url":"https://github.com/citusdata","followers_url":"https://api.github.com/users/citusdata/followers","following_url":"https://api.github.com/users/citusdata/following{/other_user}","gists_url":"https://api.github.com/users/citusdata/gists{/gist_id}","starred_url":"https://api.github.com/users/citusdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/citusdata/subscriptions","organizations_url":"https://api.github.com/users/citusdata/orgs","repos_url":"https://api.github.com/users/citusdata/repos","events_url":"https://api.github.com/users/citusdata/events{/privacy}","received_events_url":"https://api.github.com/users/citusdata/received_events","type":"Organization","site_admin":false},"repo":{"id":50874442,"name":"citus","full_name":"citusdata/citus","owner":{"login":"citusdata","id":2545424,"avatar_url":"https://avatars.githubusercontent.com/u/2545424?v=3","gravatar_id":"","url":"https://api.github.com/users/citusdata","html_url":"https://github.com/citusdata","followers_url":"https://api.github.com/users/citusdata/followers","following_url":"https://api.github.com/users/citusdata/following{/other_user}","gists_url":"https://api.github.com/users/citusdata/gists{/gist_id}","starred_url":"https://api.github.com/users/citusdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/citusdata/subscriptions","organizations_url":"https://api.github.com/users/citusdata/orgs","repos_url":"https://api.github.com/users/citusdata/repos","events_url":"https://api.github.com/users/citusdata/events{/privacy}","received_events_url":"https://api.github.com/users/citusdata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/citusdata/citus","description":"Scalable PostgreSQL for real-time workloads","fork":false,"url":"https://api.github.com/repos/citusdata/citus","forks_url":"https://api.github.com/repos/citusdata/citus/forks","keys_url":"https://api.github.com/repos/citusdata/citus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/citusdata/citus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/citusdata/citus/teams","hooks_url":"https://api.github.com/repos/citusdata/citus/hooks","issue_events_url":"https://api.github.com/repos/citusdata/citus/issues/events{/number}","events_url":"https://api.github.com/repos/citusdata/citus/events","assignees_url":"https://api.github.com/repos/citusdata/citus/assignees{/user}","branches_url":"https://api.github.com/repos/citusdata/citus/branches{/branch}","tags_url":"https://api.github.com/repos/citusdata/citus/tags","blobs_url":"https://api.github.com/repos/citusdata/citus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/citusdata/citus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/citusdata/citus/git/refs{/sha}","trees_url":"https://api.github.com/repos/citusdata/citus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/citusdata/citus/statuses/{sha}","languages_url":"https://api.github.com/repos/citusdata/citus/languages","stargazers_url":"https://api.github.com/repos/citusdata/citus/stargazers","contributors_url":"https://api.github.com/repos/citusdata/citus/contributors","subscribers_url":"https://api.github.com/repos/citusdata/citus/subscribers","subscription_url":"https://api.github.com/repos/citusdata/citus/subscription","commits_url":"https://api.github.com/repos/citusdata/citus/commits{/sha}","git_commits_url":"https://api.github.com/repos/citusdata/citus/git/commits{/sha}","comments_url":"https://api.github.com/repos/citusdata/citus/comments{/number}","issue_comment_url":"https://api.github.com/repos/citusdata/citus/issues/comments{/number}","contents_url":"https://api.github.com/repos/citusdata/citus/contents/{+path}","compare_url":"https://api.github.com/repos/citusdata/citus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/citusdata/citus/merges","archive_url":"https://api.github.com/repos/citusdata/citus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/citusdata/citus/downloads","issues_url":"https://api.github.com/repos/citusdata/citus/issues{/number}","pulls_url":"https://api.github.com/repos/citusdata/citus/pulls{/number}","milestones_url":"https://api.github.com/repos/citusdata/citus/milestones{/number}","notifications_url":"https://api.github.com/repos/citusdata/citus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/citusdata/citus/labels{/name}","releases_url":"https://api.github.com/repos/citusdata/citus/releases{/id}","deployments_url":"https://api.github.com/repos/citusdata/citus/deployments","created_at":"2016-02-01T21:58:39Z","updated_at":"2016-10-19T22:57:27Z","pushed_at":"2016-10-20T08:47:41Z","git_url":"git://github.com/citusdata/citus.git","ssh_url":"git@github.com:citusdata/citus.git","clone_url":"https://github.com/citusdata/citus.git","svn_url":"https://github.com/citusdata/citus","homepage":"https://www.citusdata.com","size":4216,"stargazers_count":1653,"watchers_count":1653,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":111,"mirror_url":null,"open_issues_count":399,"forks":111,"open_issues":399,"watchers":1653,"default_branch":"master"}},"base":{"label":"citusdata:master","ref":"master","sha":"98e0648d40fdb29e2c3104e978e0dc2a8cbf57a5","user":{"login":"citusdata","id":2545424,"avatar_url":"https://avatars.githubusercontent.com/u/2545424?v=3","gravatar_id":"","url":"https://api.github.com/users/citusdata","html_url":"https://github.com/citusdata","followers_url":"https://api.github.com/users/citusdata/followers","following_url":"https://api.github.com/users/citusdata/following{/other_user}","gists_url":"https://api.github.com/users/citusdata/gists{/gist_id}","starred_url":"https://api.github.com/users/citusdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/citusdata/subscriptions","organizations_url":"https://api.github.com/users/citusdata/orgs","repos_url":"https://api.github.com/users/citusdata/repos","events_url":"https://api.github.com/users/citusdata/events{/privacy}","received_events_url":"https://api.github.com/users/citusdata/received_events","type":"Organization","site_admin":false},"repo":{"id":50874442,"name":"citus","full_name":"citusdata/citus","owner":{"login":"citusdata","id":2545424,"avatar_url":"https://avatars.githubusercontent.com/u/2545424?v=3","gravatar_id":"","url":"https://api.github.com/users/citusdata","html_url":"https://github.com/citusdata","followers_url":"https://api.github.com/users/citusdata/followers","following_url":"https://api.github.com/users/citusdata/following{/other_user}","gists_url":"https://api.github.com/users/citusdata/gists{/gist_id}","starred_url":"https://api.github.com/users/citusdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/citusdata/subscriptions","organizations_url":"https://api.github.com/users/citusdata/orgs","repos_url":"https://api.github.com/users/citusdata/repos","events_url":"https://api.github.com/users/citusdata/events{/privacy}","received_events_url":"https://api.github.com/users/citusdata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/citusdata/citus","description":"Scalable PostgreSQL for real-time workloads","fork":false,"url":"https://api.github.com/repos/citusdata/citus","forks_url":"https://api.github.com/repos/citusdata/citus/forks","keys_url":"https://api.github.com/repos/citusdata/citus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/citusdata/citus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/citusdata/citus/teams","hooks_url":"https://api.github.com/repos/citusdata/citus/hooks","issue_events_url":"https://api.github.com/repos/citusdata/citus/issues/events{/number}","events_url":"https://api.github.com/repos/citusdata/citus/events","assignees_url":"https://api.github.com/repos/citusdata/citus/assignees{/user}","branches_url":"https://api.github.com/repos/citusdata/citus/branches{/branch}","tags_url":"https://api.github.com/repos/citusdata/citus/tags","blobs_url":"https://api.github.com/repos/citusdata/citus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/citusdata/citus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/citusdata/citus/git/refs{/sha}","trees_url":"https://api.github.com/repos/citusdata/citus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/citusdata/citus/statuses/{sha}","languages_url":"https://api.github.com/repos/citusdata/citus/languages","stargazers_url":"https://api.github.com/repos/citusdata/citus/stargazers","contributors_url":"https://api.github.com/repos/citusdata/citus/contributors","subscribers_url":"https://api.github.com/repos/citusdata/citus/subscribers","subscription_url":"https://api.github.com/repos/citusdata/citus/subscription","commits_url":"https://api.github.com/repos/citusdata/citus/commits{/sha}","git_commits_url":"https://api.github.com/repos/citusdata/citus/git/commits{/sha}","comments_url":"https://api.github.com/repos/citusdata/citus/comments{/number}","issue_comment_url":"https://api.github.com/repos/citusdata/citus/issues/comments{/number}","contents_url":"https://api.github.com/repos/citusdata/citus/contents/{+path}","compare_url":"https://api.github.com/repos/citusdata/citus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/citusdata/citus/merges","archive_url":"https://api.github.com/repos/citusdata/citus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/citusdata/citus/downloads","issues_url":"https://api.github.com/repos/citusdata/citus/issues{/number}","pulls_url":"https://api.github.com/repos/citusdata/citus/pulls{/number}","milestones_url":"https://api.github.com/repos/citusdata/citus/milestones{/number}","notifications_url":"https://api.github.com/repos/citusdata/citus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/citusdata/citus/labels{/name}","releases_url":"https://api.github.com/repos/citusdata/citus/releases{/id}","deployments_url":"https://api.github.com/repos/citusdata/citus/deployments","created_at":"2016-02-01T21:58:39Z","updated_at":"2016-10-19T22:57:27Z","pushed_at":"2016-10-20T08:47:41Z","git_url":"git://github.com/citusdata/citus.git","ssh_url":"git@github.com:citusdata/citus.git","clone_url":"https://github.com/citusdata/citus.git","svn_url":"https://github.com/citusdata/citus","homepage":"https://www.citusdata.com","size":4216,"stargazers_count":1653,"watchers_count":1653,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":111,"mirror_url":null,"open_issues_count":399,"forks":111,"open_issues":399,"watchers":1653,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/citusdata/citus/pulls/888"},"html":{"href":"https://github.com/citusdata/citus/pull/888"},"issue":{"href":"https://api.github.com/repos/citusdata/citus/issues/888"},"comments":{"href":"https://api.github.com/repos/citusdata/citus/issues/888/comments"},"review_comments":{"href":"https://api.github.com/repos/citusdata/citus/pulls/888/comments"},"review_comment":{"href":"https://api.github.com/repos/citusdata/citus/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/citusdata/citus/pulls/888/commits"},"statuses":{"href":"https://api.github.com/repos/citusdata/citus/statuses/a6de5099f000a20441e620a183f65144871248c9"}}}}
{"actor":{"display_login":"marcocitus"}}