{"action":"created","comment":{"url":"https://api.github.com/repos/romana/core/pulls/comments/59420165","id":59420165,"diff_hunk":"@@ -38,10 +40,11 @@ func (tenantStore *tenantStore) Entities() []interface{} {\n }\n \n type Tenant struct {\n-\tId       uint64 `sql:\"AUTO_INCREMENT\"`\n-\tName     string\n-\tSegments []Segment\n-\tSeq      uint64\n+\tID         uint64 `sql:\"AUTO_INCREMENT\"`\n+\tExternalID string `sql:\"not null;unique\"`","path":"tenant/store.go","position":25,"original_position":25,"commit_id":"f05d29f3e61e1255ebf63c3f925dfca9cb0ccf6d","original_commit_id":"f05d29f3e61e1255ebf63c3f925dfca9cb0ccf6d","user":{"login":"debedb","id":619943,"avatar_url":"https://avatars.githubusercontent.com/u/619943?v=3","gravatar_id":"","url":"https://api.github.com/users/debedb","html_url":"https://github.com/debedb","followers_url":"https://api.github.com/users/debedb/followers","following_url":"https://api.github.com/users/debedb/following{/other_user}","gists_url":"https://api.github.com/users/debedb/gists{/gist_id}","starred_url":"https://api.github.com/users/debedb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/debedb/subscriptions","organizations_url":"https://api.github.com/users/debedb/orgs","repos_url":"https://api.github.com/users/debedb/repos","events_url":"https://api.github.com/users/debedb/events{/privacy}","received_events_url":"https://api.github.com/users/debedb/received_events","type":"User","site_admin":false},"body":"So there has to be a comment about which ID we should use in the REST requests generally (responses would have both). Is it - we have facility to look up our ID by External ID but our ID is primary - or we always use external?\r\n\r\nThis place in the code is probably is not a good place for such a comment as it would apply to all entities, but asking this question in the main tab doesn't keep the conversation straight so I'm adding this comment here.","created_at":"2016-04-12T17:43:45Z","updated_at":"2016-04-12T17:43:45Z","html_url":"https://github.com/romana/core/pull/66#discussion_r59420165","pull_request_url":"https://api.github.com/repos/romana/core/pulls/66","_links":{"self":{"href":"https://api.github.com/repos/romana/core/pulls/comments/59420165"},"html":{"href":"https://github.com/romana/core/pull/66#discussion_r59420165"},"pull_request":{"href":"https://api.github.com/repos/romana/core/pulls/66"}}},"pull_request":{"url":"https://api.github.com/repos/romana/core/pulls/66","id":65731878,"html_url":"https://github.com/romana/core/pull/66","diff_url":"https://github.com/romana/core/pull/66.diff","patch_url":"https://github.com/romana/core/pull/66.patch","issue_url":"https://api.github.com/repos/romana/core/issues/66","number":66,"state":"open","locked":false,"title":"Add support for UUID's in tenant.","user":{"login":"pritesh","id":9474171,"avatar_url":"https://avatars.githubusercontent.com/u/9474171?v=3","gravatar_id":"","url":"https://api.github.com/users/pritesh","html_url":"https://github.com/pritesh","followers_url":"https://api.github.com/users/pritesh/followers","following_url":"https://api.github.com/users/pritesh/following{/other_user}","gists_url":"https://api.github.com/users/pritesh/gists{/gist_id}","starred_url":"https://api.github.com/users/pritesh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pritesh/subscriptions","organizations_url":"https://api.github.com/users/pritesh/orgs","repos_url":"https://api.github.com/users/pritesh/repos","events_url":"https://api.github.com/users/pritesh/events{/privacy}","received_events_url":"https://api.github.com/users/pritesh/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-04-08T03:23:27Z","updated_at":"2016-04-12T17:43:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0ebeb97b0ef1a30d1aa8a88f05b79603b74ed68b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/romana/core/pulls/66/commits","review_comments_url":"https://api.github.com/repos/romana/core/pulls/66/comments","review_comment_url":"https://api.github.com/repos/romana/core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/romana/core/issues/66/comments","statuses_url":"https://api.github.com/repos/romana/core/statuses/f05d29f3e61e1255ebf63c3f925dfca9cb0ccf6d","head":{"label":"romana:feature/uuid","ref":"feature/uuid","sha":"f05d29f3e61e1255ebf63c3f925dfca9cb0ccf6d","user":{"login":"romana","id":9849297,"avatar_url":"https://avatars.githubusercontent.com/u/9849297?v=3","gravatar_id":"","url":"https://api.github.com/users/romana","html_url":"https://github.com/romana","followers_url":"https://api.github.com/users/romana/followers","following_url":"https://api.github.com/users/romana/following{/other_user}","gists_url":"https://api.github.com/users/romana/gists{/gist_id}","starred_url":"https://api.github.com/users/romana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/romana/subscriptions","organizations_url":"https://api.github.com/users/romana/orgs","repos_url":"https://api.github.com/users/romana/repos","events_url":"https://api.github.com/users/romana/events{/privacy}","received_events_url":"https://api.github.com/users/romana/received_events","type":"Organization","site_admin":false},"repo":{"id":43855674,"name":"core","full_name":"romana/core","owner":{"login":"romana","id":9849297,"avatar_url":"https://avatars.githubusercontent.com/u/9849297?v=3","gravatar_id":"","url":"https://api.github.com/users/romana","html_url":"https://github.com/romana","followers_url":"https://api.github.com/users/romana/followers","following_url":"https://api.github.com/users/romana/following{/other_user}","gists_url":"https://api.github.com/users/romana/gists{/gist_id}","starred_url":"https://api.github.com/users/romana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/romana/subscriptions","organizations_url":"https://api.github.com/users/romana/orgs","repos_url":"https://api.github.com/users/romana/repos","events_url":"https://api.github.com/users/romana/events{/privacy}","received_events_url":"https://api.github.com/users/romana/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/romana/core","description":"Romana core components - Micro services written in Go.","fork":false,"url":"https://api.github.com/repos/romana/core","forks_url":"https://api.github.com/repos/romana/core/forks","keys_url":"https://api.github.com/repos/romana/core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/romana/core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/romana/core/teams","hooks_url":"https://api.github.com/repos/romana/core/hooks","issue_events_url":"https://api.github.com/repos/romana/core/issues/events{/number}","events_url":"https://api.github.com/repos/romana/core/events","assignees_url":"https://api.github.com/repos/romana/core/assignees{/user}","branches_url":"https://api.github.com/repos/romana/core/branches{/branch}","tags_url":"https://api.github.com/repos/romana/core/tags","blobs_url":"https://api.github.com/repos/romana/core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/romana/core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/romana/core/git/refs{/sha}","trees_url":"https://api.github.com/repos/romana/core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/romana/core/statuses/{sha}","languages_url":"https://api.github.com/repos/romana/core/languages","stargazers_url":"https://api.github.com/repos/romana/core/stargazers","contributors_url":"https://api.github.com/repos/romana/core/contributors","subscribers_url":"https://api.github.com/repos/romana/core/subscribers","subscription_url":"https://api.github.com/repos/romana/core/subscription","commits_url":"https://api.github.com/repos/romana/core/commits{/sha}","git_commits_url":"https://api.github.com/repos/romana/core/git/commits{/sha}","comments_url":"https://api.github.com/repos/romana/core/comments{/number}","issue_comment_url":"https://api.github.com/repos/romana/core/issues/comments{/number}","contents_url":"https://api.github.com/repos/romana/core/contents/{+path}","compare_url":"https://api.github.com/repos/romana/core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/romana/core/merges","archive_url":"https://api.github.com/repos/romana/core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/romana/core/downloads","issues_url":"https://api.github.com/repos/romana/core/issues{/number}","pulls_url":"https://api.github.com/repos/romana/core/pulls{/number}","milestones_url":"https://api.github.com/repos/romana/core/milestones{/number}","notifications_url":"https://api.github.com/repos/romana/core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/romana/core/labels{/name}","releases_url":"https://api.github.com/repos/romana/core/releases{/id}","deployments_url":"https://api.github.com/repos/romana/core/deployments","created_at":"2015-10-08T01:45:35Z","updated_at":"2016-04-08T08:08:38Z","pushed_at":"2016-04-12T06:39:45Z","git_url":"git://github.com/romana/core.git","ssh_url":"git@github.com:romana/core.git","clone_url":"https://github.com/romana/core.git","svn_url":"https://github.com/romana/core","homepage":"","size":489,"stargazers_count":9,"watchers_count":9,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":6,"forks":3,"open_issues":6,"watchers":9,"default_branch":"master"}},"base":{"label":"romana:master","ref":"master","sha":"89ad640f889cdfb01d669b56dfdda189de1d900a","user":{"login":"romana","id":9849297,"avatar_url":"https://avatars.githubusercontent.com/u/9849297?v=3","gravatar_id":"","url":"https://api.github.com/users/romana","html_url":"https://github.com/romana","followers_url":"https://api.github.com/users/romana/followers","following_url":"https://api.github.com/users/romana/following{/other_user}","gists_url":"https://api.github.com/users/romana/gists{/gist_id}","starred_url":"https://api.github.com/users/romana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/romana/subscriptions","organizations_url":"https://api.github.com/users/romana/orgs","repos_url":"https://api.github.com/users/romana/repos","events_url":"https://api.github.com/users/romana/events{/privacy}","received_events_url":"https://api.github.com/users/romana/received_events","type":"Organization","site_admin":false},"repo":{"id":43855674,"name":"core","full_name":"romana/core","owner":{"login":"romana","id":9849297,"avatar_url":"https://avatars.githubusercontent.com/u/9849297?v=3","gravatar_id":"","url":"https://api.github.com/users/romana","html_url":"https://github.com/romana","followers_url":"https://api.github.com/users/romana/followers","following_url":"https://api.github.com/users/romana/following{/other_user}","gists_url":"https://api.github.com/users/romana/gists{/gist_id}","starred_url":"https://api.github.com/users/romana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/romana/subscriptions","organizations_url":"https://api.github.com/users/romana/orgs","repos_url":"https://api.github.com/users/romana/repos","events_url":"https://api.github.com/users/romana/events{/privacy}","received_events_url":"https://api.github.com/users/romana/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/romana/core","description":"Romana core components - Micro services written in Go.","fork":false,"url":"https://api.github.com/repos/romana/core","forks_url":"https://api.github.com/repos/romana/core/forks","keys_url":"https://api.github.com/repos/romana/core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/romana/core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/romana/core/teams","hooks_url":"https://api.github.com/repos/romana/core/hooks","issue_events_url":"https://api.github.com/repos/romana/core/issues/events{/number}","events_url":"https://api.github.com/repos/romana/core/events","assignees_url":"https://api.github.com/repos/romana/core/assignees{/user}","branches_url":"https://api.github.com/repos/romana/core/branches{/branch}","tags_url":"https://api.github.com/repos/romana/core/tags","blobs_url":"https://api.github.com/repos/romana/core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/romana/core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/romana/core/git/refs{/sha}","trees_url":"https://api.github.com/repos/romana/core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/romana/core/statuses/{sha}","languages_url":"https://api.github.com/repos/romana/core/languages","stargazers_url":"https://api.github.com/repos/romana/core/stargazers","contributors_url":"https://api.github.com/repos/romana/core/contributors","subscribers_url":"https://api.github.com/repos/romana/core/subscribers","subscription_url":"https://api.github.com/repos/romana/core/subscription","commits_url":"https://api.github.com/repos/romana/core/commits{/sha}","git_commits_url":"https://api.github.com/repos/romana/core/git/commits{/sha}","comments_url":"https://api.github.com/repos/romana/core/comments{/number}","issue_comment_url":"https://api.github.com/repos/romana/core/issues/comments{/number}","contents_url":"https://api.github.com/repos/romana/core/contents/{+path}","compare_url":"https://api.github.com/repos/romana/core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/romana/core/merges","archive_url":"https://api.github.com/repos/romana/core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/romana/core/downloads","issues_url":"https://api.github.com/repos/romana/core/issues{/number}","pulls_url":"https://api.github.com/repos/romana/core/pulls{/number}","milestones_url":"https://api.github.com/repos/romana/core/milestones{/number}","notifications_url":"https://api.github.com/repos/romana/core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/romana/core/labels{/name}","releases_url":"https://api.github.com/repos/romana/core/releases{/id}","deployments_url":"https://api.github.com/repos/romana/core/deployments","created_at":"2015-10-08T01:45:35Z","updated_at":"2016-04-08T08:08:38Z","pushed_at":"2016-04-12T06:39:45Z","git_url":"git://github.com/romana/core.git","ssh_url":"git@github.com:romana/core.git","clone_url":"https://github.com/romana/core.git","svn_url":"https://github.com/romana/core","homepage":"","size":489,"stargazers_count":9,"watchers_count":9,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":6,"forks":3,"open_issues":6,"watchers":9,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/romana/core/pulls/66"},"html":{"href":"https://github.com/romana/core/pull/66"},"issue":{"href":"https://api.github.com/repos/romana/core/issues/66"},"comments":{"href":"https://api.github.com/repos/romana/core/issues/66/comments"},"review_comments":{"href":"https://api.github.com/repos/romana/core/pulls/66/comments"},"review_comment":{"href":"https://api.github.com/repos/romana/core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/romana/core/pulls/66/commits"},"statuses":{"href":"https://api.github.com/repos/romana/core/statuses/f05d29f3e61e1255ebf63c3f925dfca9cb0ccf6d"}}}}