{"action":"created","comment":{"url":"https://api.github.com/repos/cockroachdb/cockroach/pulls/comments/31737747","id":31737747,"diff_hunk":"@@ -0,0 +1,91 @@\n+// Copyright 2015 The Cockroach Authors.\n+//\n+// Licensed under the Apache License, Version 2.0 (the \"License\");\n+// you may not use this file except in compliance with the License.\n+// You may obtain a copy of the License at\n+//\n+//     http://www.apache.org/licenses/LICENSE-2.0\n+//\n+// Unless required by applicable law or agreed to in writing, software\n+// distributed under the License is distributed on an \"AS IS\" BASIS,\n+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n+// implied. See the License for the specific language governing\n+// permissions and limitations under the License. See the AUTHORS file\n+// for names of contributors.\n+//\n+// Author: Tamir Duberstein (tamird@gmail.com)\n+\n+syntax = \"proto2\";\n+package cockroach.proto;\n+option go_package = \"proto\";\n+\n+import \"gogoproto/gogo.proto\";\n+import \"cockroach/proto/api.proto\";\n+import \"cockroach/proto/errors.proto\";\n+\n+option (gogoproto.sizer_all) = true;\n+option (gogoproto.marshaler_all) = true;\n+option (gogoproto.unmarshaler_all) = true;\n+\n+message Column {\n+  enum ColumnType {\n+    // option (gogoproto.goproto_enum_prefix) = false;\n+    BYTES = 0;\n+  }\n+\n+  optional string name = 1 [(gogoproto.nullable) = false];\n+  optional ColumnType type = 2 [(gogoproto.nullable) = false];\n+}\n+\n+message Index {\n+  optional string name = 1 [(gogoproto.nullable) = false];\n+  optional bool unique = 2 [(gogoproto.nullable) = false];\n+}\n+\n+message TableSchema {\n+  message IndexByName {\n+    optional Index index = 1 [(gogoproto.nullable) = false, (gogoproto.embed) = true];\n+    repeated string column_names = 2 [(gogoproto.nullable) = false];\n+  }\n+  optional string name = 1 [(gogoproto.nullable) = false];\n+  repeated Column columns = 2 [(gogoproto.nullable) = false];\n+  repeated Index indexes = 3 [(gogoproto.nullable) = false];\n+}\n+\n+// A TableDescriptor represents a table and is stored in a structured metadata\n+// key. The TableDescriptor has a globally-unique ID, while its member\n+// {Column,Index}Descriptors have locally-unique IDs.\n+message TableDescriptor {","path":"proto/structured.proto","position":62,"original_position":58,"commit_id":"4a35070550ef1ea78fd73f0dc20b955168c60d59","original_commit_id":"325a2adc45d09c7b0400a7d1d7bf914214a41b24","user":{"login":"tamird","id":1535036,"avatar_url":"https://avatars.githubusercontent.com/u/1535036?v=3","gravatar_id":"","url":"https://api.github.com/users/tamird","html_url":"https://github.com/tamird","followers_url":"https://api.github.com/users/tamird/followers","following_url":"https://api.github.com/users/tamird/following{/other_user}","gists_url":"https://api.github.com/users/tamird/gists{/gist_id}","starred_url":"https://api.github.com/users/tamird/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tamird/subscriptions","organizations_url":"https://api.github.com/users/tamird/orgs","repos_url":"https://api.github.com/users/tamird/repos","events_url":"https://api.github.com/users/tamird/events{/privacy}","received_events_url":"https://api.github.com/users/tamird/received_events","type":"User","site_admin":false},"body":"I agree re `api.proto`, but I think that this is an opportunity to try something different. In the worst case, we'll discard `TableSchema`, which would not be a huge change. For now this is more descriptive, let's try it out?","created_at":"2015-06-04T16:25:14Z","updated_at":"2015-06-04T16:25:14Z","html_url":"https://github.com/cockroachdb/cockroach/pull/1261#discussion_r31737747","pull_request_url":"https://api.github.com/repos/cockroachdb/cockroach/pulls/1261","_links":{"self":{"href":"https://api.github.com/repos/cockroachdb/cockroach/pulls/comments/31737747"},"html":{"href":"https://github.com/cockroachdb/cockroach/pull/1261#discussion_r31737747"},"pull_request":{"href":"https://api.github.com/repos/cockroachdb/cockroach/pulls/1261"}}},"pull_request":{"url":"https://api.github.com/repos/cockroachdb/cockroach/pulls/1261","id":36943371,"html_url":"https://github.com/cockroachdb/cockroach/pull/1261","diff_url":"https://github.com/cockroachdb/cockroach/pull/1261.diff","patch_url":"https://github.com/cockroachdb/cockroach/pull/1261.patch","issue_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/1261","number":1261,"state":"open","locked":false,"title":"Sketch out TableDescriptor and CreateTable","user":{"login":"tamird","id":1535036,"avatar_url":"https://avatars.githubusercontent.com/u/1535036?v=3","gravatar_id":"","url":"https://api.github.com/users/tamird","html_url":"https://github.com/tamird","followers_url":"https://api.github.com/users/tamird/followers","following_url":"https://api.github.com/users/tamird/following{/other_user}","gists_url":"https://api.github.com/users/tamird/gists{/gist_id}","starred_url":"https://api.github.com/users/tamird/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tamird/subscriptions","organizations_url":"https://api.github.com/users/tamird/orgs","repos_url":"https://api.github.com/users/tamird/repos","events_url":"https://api.github.com/users/tamird/events{/privacy}","received_events_url":"https://api.github.com/users/tamird/received_events","type":"User","site_admin":false},"body":"@cockroachdb/structured ","created_at":"2015-06-04T15:03:34Z","updated_at":"2015-06-04T16:25:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7dc23df38ab51cc4eb6260bb625873cbc627edde","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/cockroachdb/cockroach/pulls/1261/commits","review_comments_url":"https://api.github.com/repos/cockroachdb/cockroach/pulls/1261/comments","review_comment_url":"https://api.github.com/repos/cockroachdb/cockroach/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/1261/comments","statuses_url":"https://api.github.com/repos/cockroachdb/cockroach/statuses/4a35070550ef1ea78fd73f0dc20b955168c60d59","head":{"label":"tamird:table-descriptor","ref":"table-descriptor","sha":"4a35070550ef1ea78fd73f0dc20b955168c60d59","user":{"login":"tamird","id":1535036,"avatar_url":"https://avatars.githubusercontent.com/u/1535036?v=3","gravatar_id":"","url":"https://api.github.com/users/tamird","html_url":"https://github.com/tamird","followers_url":"https://api.github.com/users/tamird/followers","following_url":"https://api.github.com/users/tamird/following{/other_user}","gists_url":"https://api.github.com/users/tamird/gists{/gist_id}","starred_url":"https://api.github.com/users/tamird/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tamird/subscriptions","organizations_url":"https://api.github.com/users/tamird/orgs","repos_url":"https://api.github.com/users/tamird/repos","events_url":"https://api.github.com/users/tamird/events{/privacy}","received_events_url":"https://api.github.com/users/tamird/received_events","type":"User","site_admin":false},"repo":{"id":35114205,"name":"cockroach","full_name":"tamird/cockroach","owner":{"login":"tamird","id":1535036,"avatar_url":"https://avatars.githubusercontent.com/u/1535036?v=3","gravatar_id":"","url":"https://api.github.com/users/tamird","html_url":"https://github.com/tamird","followers_url":"https://api.github.com/users/tamird/followers","following_url":"https://api.github.com/users/tamird/following{/other_user}","gists_url":"https://api.github.com/users/tamird/gists{/gist_id}","starred_url":"https://api.github.com/users/tamird/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tamird/subscriptions","organizations_url":"https://api.github.com/users/tamird/orgs","repos_url":"https://api.github.com/users/tamird/repos","events_url":"https://api.github.com/users/tamird/events{/privacy}","received_events_url":"https://api.github.com/users/tamird/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tamird/cockroach","description":"A Scalable, Geo-Replicated, Transactional Datastore","fork":true,"url":"https://api.github.com/repos/tamird/cockroach","forks_url":"https://api.github.com/repos/tamird/cockroach/forks","keys_url":"https://api.github.com/repos/tamird/cockroach/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tamird/cockroach/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tamird/cockroach/teams","hooks_url":"https://api.github.com/repos/tamird/cockroach/hooks","issue_events_url":"https://api.github.com/repos/tamird/cockroach/issues/events{/number}","events_url":"https://api.github.com/repos/tamird/cockroach/events","assignees_url":"https://api.github.com/repos/tamird/cockroach/assignees{/user}","branches_url":"https://api.github.com/repos/tamird/cockroach/branches{/branch}","tags_url":"https://api.github.com/repos/tamird/cockroach/tags","blobs_url":"https://api.github.com/repos/tamird/cockroach/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tamird/cockroach/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tamird/cockroach/git/refs{/sha}","trees_url":"https://api.github.com/repos/tamird/cockroach/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tamird/cockroach/statuses/{sha}","languages_url":"https://api.github.com/repos/tamird/cockroach/languages","stargazers_url":"https://api.github.com/repos/tamird/cockroach/stargazers","contributors_url":"https://api.github.com/repos/tamird/cockroach/contributors","subscribers_url":"https://api.github.com/repos/tamird/cockroach/subscribers","subscription_url":"https://api.github.com/repos/tamird/cockroach/subscription","commits_url":"https://api.github.com/repos/tamird/cockroach/commits{/sha}","git_commits_url":"https://api.github.com/repos/tamird/cockroach/git/commits{/sha}","comments_url":"https://api.github.com/repos/tamird/cockroach/comments{/number}","issue_comment_url":"https://api.github.com/repos/tamird/cockroach/issues/comments{/number}","contents_url":"https://api.github.com/repos/tamird/cockroach/contents/{+path}","compare_url":"https://api.github.com/repos/tamird/cockroach/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tamird/cockroach/merges","archive_url":"https://api.github.com/repos/tamird/cockroach/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tamird/cockroach/downloads","issues_url":"https://api.github.com/repos/tamird/cockroach/issues{/number}","pulls_url":"https://api.github.com/repos/tamird/cockroach/pulls{/number}","milestones_url":"https://api.github.com/repos/tamird/cockroach/milestones{/number}","notifications_url":"https://api.github.com/repos/tamird/cockroach/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tamird/cockroach/labels{/name}","releases_url":"https://api.github.com/repos/tamird/cockroach/releases{/id}","created_at":"2015-05-05T17:34:04Z","updated_at":"2015-05-06T22:06:29Z","pushed_at":"2015-06-04T15:53:06Z","git_url":"git://github.com/tamird/cockroach.git","ssh_url":"git@github.com:tamird/cockroach.git","clone_url":"https://github.com/tamird/cockroach.git","svn_url":"https://github.com/tamird/cockroach","homepage":null,"size":19710,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"cockroachdb:master","ref":"master","sha":"a7782701ae545cabf03f54f262fc36cb5bf201e8","user":{"login":"cockroachdb","id":6748139,"avatar_url":"https://avatars.githubusercontent.com/u/6748139?v=3","gravatar_id":"","url":"https://api.github.com/users/cockroachdb","html_url":"https://github.com/cockroachdb","followers_url":"https://api.github.com/users/cockroachdb/followers","following_url":"https://api.github.com/users/cockroachdb/following{/other_user}","gists_url":"https://api.github.com/users/cockroachdb/gists{/gist_id}","starred_url":"https://api.github.com/users/cockroachdb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cockroachdb/subscriptions","organizations_url":"https://api.github.com/users/cockroachdb/orgs","repos_url":"https://api.github.com/users/cockroachdb/repos","events_url":"https://api.github.com/users/cockroachdb/events{/privacy}","received_events_url":"https://api.github.com/users/cockroachdb/received_events","type":"Organization","site_admin":false},"repo":{"id":16563587,"name":"cockroach","full_name":"cockroachdb/cockroach","owner":{"login":"cockroachdb","id":6748139,"avatar_url":"https://avatars.githubusercontent.com/u/6748139?v=3","gravatar_id":"","url":"https://api.github.com/users/cockroachdb","html_url":"https://github.com/cockroachdb","followers_url":"https://api.github.com/users/cockroachdb/followers","following_url":"https://api.github.com/users/cockroachdb/following{/other_user}","gists_url":"https://api.github.com/users/cockroachdb/gists{/gist_id}","starred_url":"https://api.github.com/users/cockroachdb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cockroachdb/subscriptions","organizations_url":"https://api.github.com/users/cockroachdb/orgs","repos_url":"https://api.github.com/users/cockroachdb/repos","events_url":"https://api.github.com/users/cockroachdb/events{/privacy}","received_events_url":"https://api.github.com/users/cockroachdb/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cockroachdb/cockroach","description":"A Scalable, Geo-Replicated, Transactional Datastore","fork":false,"url":"https://api.github.com/repos/cockroachdb/cockroach","forks_url":"https://api.github.com/repos/cockroachdb/cockroach/forks","keys_url":"https://api.github.com/repos/cockroachdb/cockroach/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cockroachdb/cockroach/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cockroachdb/cockroach/teams","hooks_url":"https://api.github.com/repos/cockroachdb/cockroach/hooks","issue_events_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/events{/number}","events_url":"https://api.github.com/repos/cockroachdb/cockroach/events","assignees_url":"https://api.github.com/repos/cockroachdb/cockroach/assignees{/user}","branches_url":"https://api.github.com/repos/cockroachdb/cockroach/branches{/branch}","tags_url":"https://api.github.com/repos/cockroachdb/cockroach/tags","blobs_url":"https://api.github.com/repos/cockroachdb/cockroach/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cockroachdb/cockroach/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cockroachdb/cockroach/git/refs{/sha}","trees_url":"https://api.github.com/repos/cockroachdb/cockroach/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cockroachdb/cockroach/statuses/{sha}","languages_url":"https://api.github.com/repos/cockroachdb/cockroach/languages","stargazers_url":"https://api.github.com/repos/cockroachdb/cockroach/stargazers","contributors_url":"https://api.github.com/repos/cockroachdb/cockroach/contributors","subscribers_url":"https://api.github.com/repos/cockroachdb/cockroach/subscribers","subscription_url":"https://api.github.com/repos/cockroachdb/cockroach/subscription","commits_url":"https://api.github.com/repos/cockroachdb/cockroach/commits{/sha}","git_commits_url":"https://api.github.com/repos/cockroachdb/cockroach/git/commits{/sha}","comments_url":"https://api.github.com/repos/cockroachdb/cockroach/comments{/number}","issue_comment_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/comments{/number}","contents_url":"https://api.github.com/repos/cockroachdb/cockroach/contents/{+path}","compare_url":"https://api.github.com/repos/cockroachdb/cockroach/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cockroachdb/cockroach/merges","archive_url":"https://api.github.com/repos/cockroachdb/cockroach/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cockroachdb/cockroach/downloads","issues_url":"https://api.github.com/repos/cockroachdb/cockroach/issues{/number}","pulls_url":"https://api.github.com/repos/cockroachdb/cockroach/pulls{/number}","milestones_url":"https://api.github.com/repos/cockroachdb/cockroach/milestones{/number}","notifications_url":"https://api.github.com/repos/cockroachdb/cockroach/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cockroachdb/cockroach/labels{/name}","releases_url":"https://api.github.com/repos/cockroachdb/cockroach/releases{/id}","created_at":"2014-02-06T00:18:47Z","updated_at":"2015-06-04T16:09:47Z","pushed_at":"2015-06-04T16:16:14Z","git_url":"git://github.com/cockroachdb/cockroach.git","ssh_url":"git@github.com:cockroachdb/cockroach.git","clone_url":"https://github.com/cockroachdb/cockroach.git","svn_url":"https://github.com/cockroachdb/cockroach","homepage":null,"size":42808,"stargazers_count":3481,"watchers_count":3481,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":278,"mirror_url":null,"open_issues_count":83,"forks":278,"open_issues":83,"watchers":3481,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cockroachdb/cockroach/pulls/1261"},"html":{"href":"https://github.com/cockroachdb/cockroach/pull/1261"},"issue":{"href":"https://api.github.com/repos/cockroachdb/cockroach/issues/1261"},"comments":{"href":"https://api.github.com/repos/cockroachdb/cockroach/issues/1261/comments"},"review_comments":{"href":"https://api.github.com/repos/cockroachdb/cockroach/pulls/1261/comments"},"review_comment":{"href":"https://api.github.com/repos/cockroachdb/cockroach/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cockroachdb/cockroach/pulls/1261/commits"},"statuses":{"href":"https://api.github.com/repos/cockroachdb/cockroach/statuses/4a35070550ef1ea78fd73f0dc20b955168c60d59"}}}}