{"action":"created","comment":{"url":"https://api.github.com/repos/edx/edx-documentation/pulls/comments/40120690","id":40120690,"diff_hunk":"@@ -971,6 +980,254 @@ code\n   codes for simplified and traditional Chinese.\n \n \n+.. _teams_courseteam:\n+\n+==============================================\n+Columns in the teams_courseteam Table\n+==============================================\n+\n+This table stores information about the teams in a course.\n+\n+.. note:: The Teams feature is in limited release. For more information,\n+   contact your edX Partner Manager. For Open edX sites, contact your system\n+   administrator.\n+\n+**History**: Added September 15 2015\n+\n+The ``teams_courseteam`` table has the following columns.\n+\n+.. list-table::\n+     :widths: 15 15 15 15\n+     :header-rows: 1\n+\n+     * - Column\n+       - Type\n+       - Null\n+       - Key\n+     * - id\n+       - int(11)\n+       - NO\n+       - PRI   \n+     * - team_id\n+       - varchar(255)  \n+       - NO\n+       - UNI\n+     * - name\n+       - varchar(255)\n+       - NO\n+       - UNI \n+     * - course_id\n+       - textfield\n+       - NO\n+       - MUL\n+     * - topic_id\n+       - varchar(255)\n+       - YES\n+       - MUL\n+     * - date_created\n+       - datetime\n+       - NO\n+       - MUL \n+     * - description\n+       - varchar(300)\n+       - NO\n+       - MUL\n+     * - country\n+       - varchar(2)\n+       - YES\n+       - MUL \n+     * - language\n+       - varchar(16)\n+       - YES\n+       - MUL             \n+     * - discussion_topic_id\n+       - varchar(255)\n+       - NO\n+       - MUL\n+     * - last_activity_at\n+       - datetime\n+       - NO\n+       - MUL\n+     * - team_size\n+       - int(11)\n+       - NO\n+       - MUL\n+\n+\n+--------------------\n+id\n+--------------------\n+\n+  The primary key, representing the team.\n+\n+---------\n+team_id\n+---------\n+\n+  The unique identifier for this team. \n+\n+---------------------\n+name\n+---------------------\n+\n+  The display name for this team. A name is required when a team is created.\n+\n+---------------------\n+course_id\n+---------------------\n+\n+  The course identifier, in the format ``{key type}:{org}+{course}+{run}``. For\n+  example, ``course-v1:edX+DemoX+Demo_2014``.\n+\n+  **History**: In October 2014, identifiers for some new courses began to use\n+  the format shown above. Other new courses, and all courses created prior to\n+  October 2014, use the format ``{org}/{course}/{run}``,  for example,\n+  ``MITx/6.002x/2012_Fall``.\n+\n+---------------------\n+topic_id\n+---------------------\n+\n+  The unique identifier for the teams topic associated with the team. Topics,\n+  including an ID for each topic, are defined by course team members in\n+  **Advanced Settings** in Studio.\n+\n+---------------------\n+date_created\n+---------------------\n+\n+  The date and time that this team was created, in the format ``YYYY-\n+  MM-DD HH:MM:SS``.\n+\n+---------------------\n+description\n+---------------------\n+\n+  The description for the team. A team description is required when a team is\n+  created.\n+\n+---------------------\n+country\n+---------------------\n+\n+  An optional field in a team's details. The person who creates a team can\n+  specify a country that the team's members primarily identify with. Country\n+  codes are ISO 3166-1 codes.\n+\n+---------------------\n+language\n+---------------------\n+   \n+  An optional field in a team's details. A team can specify a language that\n+  the team's members primarily communicate using. Most language codes are ISO\n+  639-1 codes, with the addition of codes for simplified and traditional\n+  Chinese.\n+\n+---------------------\n+discussion_topic_id\n+---------------------\n+\n+  The identifier for all threads in this team's discussions.  \n+\n+--------------------\n+last_activity_at\n+--------------------\n+\n+  The date and time that the most recent activity on the team was recorded, in\n+  the format ``YYYY- MM-DD HH:MM:SS``. The current definition of activity for\n+  this field includes team creation, and posts, comments, and responses in the\n+  team's discussions.\n+\n+\n+--------------------\n+team_size\n+--------------------\n+\n+  The current count of the number of members in the team.\n+\n+\n+.. _teams_courseteammembership:\n+\n+================================================\n+Columns in the teams_courseteammembership Table\n+================================================\n+\n+This table stores information about learners who are members of a team.\n+\n+.. note:: The Teams feature is in limited release. For more information,\n+   contact your edX Partner Manager. For Open edX sites, contact your system\n+   administrator.\n+\n+**History**: Added September 15 2015.\n+\n+The ``teams_courseteammembership`` table has the following columns.\n+\n+.. list-table::\n+     :widths: 15 15 15 15\n+     :header-rows: 1\n+\n+     * - Column\n+       - Type\n+       - Null\n+       - Key\n+     * - id\n+       - int (11)\n+       - NO\n+       - PRI  \n+     * - user_id\n+       - int (11)\n+       - NO\n+       - UNI\n+     * - team_id\n+       - int (11)\n+       - NO\n+       - MUL\n+     * - date_joined\n+       - datetime\n+       - NO\n+       - MUL\n+     * - last_activity_at\n+       - datetime\n+       - NO\n+       - MUL\n+\n+---------------------\n+id\n+---------------------\n+\n+  The primary key, representing the membership of a user on a team.\n+\n+---------------------\n+user_id\n+---------------------\n+\n+  The ID of a user who is currently a member of the team, from\n+  ``auth_user.id``.\n+\n+---------------------\n+team_id\n+---------------------\n+\n+  The ID of the team, from ``teams_courseteam.id``.\n+\n+--------------------\n+date_joined\n+--------------------\n+\n+  The timestamp of the time that the user joined the team, in the format\n+  ``YYYY- MM-DD HH:MM:SS``.\n+\n+--------------------\n+last_activity_at\n+--------------------\n+\n+  The date/time of the most recent activity performed by this user on this\n+  team, in the format ``YYYY- MM-DD HH:MM:SS``. The current definition of\n+  activity for this field is limited to discussions-related actions by this\n+  user: adding or deleting posts, adding comments or responses, and voting on\n+  posts.","path":"en_us/data/source/internal_data_formats/sql_schema.rst","position":265,"original_position":265,"commit_id":"6a311f6b914045c4b0b3390b74e032ddb62a5350","original_commit_id":"6a311f6b914045c4b0b3390b74e032ddb62a5350","user":{"login":"catong","id":9041399,"avatar_url":"https://avatars.githubusercontent.com/u/9041399?v=3","gravatar_id":"","url":"https://api.github.com/users/catong","html_url":"https://github.com/catong","followers_url":"https://api.github.com/users/catong/followers","following_url":"https://api.github.com/users/catong/following{/other_user}","gists_url":"https://api.github.com/users/catong/gists{/gist_id}","starred_url":"https://api.github.com/users/catong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/catong/subscriptions","organizations_url":"https://api.github.com/users/catong/orgs","repos_url":"https://api.github.com/users/catong/repos","events_url":"https://api.github.com/users/catong/events{/privacy}","received_events_url":"https://api.github.com/users/catong/received_events","type":"User","site_admin":false},"body":"Thanks, @dianakhuang - I'll add that info.","created_at":"2015-09-22T18:01:01Z","updated_at":"2015-09-22T18:01:01Z","html_url":"https://github.com/edx/edx-documentation/pull/555#discussion_r40120690","pull_request_url":"https://api.github.com/repos/edx/edx-documentation/pulls/555","_links":{"self":{"href":"https://api.github.com/repos/edx/edx-documentation/pulls/comments/40120690"},"html":{"href":"https://github.com/edx/edx-documentation/pull/555#discussion_r40120690"},"pull_request":{"href":"https://api.github.com/repos/edx/edx-documentation/pulls/555"}}},"pull_request":{"url":"https://api.github.com/repos/edx/edx-documentation/pulls/555","id":45107266,"html_url":"https://github.com/edx/edx-documentation/pull/555","diff_url":"https://github.com/edx/edx-documentation/pull/555.diff","patch_url":"https://github.com/edx/edx-documentation/pull/555.patch","issue_url":"https://api.github.com/repos/edx/edx-documentation/issues/555","number":555,"state":"open","locked":false,"title":"DOC: Teams SQL tables in Research Guide","user":{"login":"catong","id":9041399,"avatar_url":"https://avatars.githubusercontent.com/u/9041399?v=3","gravatar_id":"","url":"https://api.github.com/users/catong","html_url":"https://github.com/catong","followers_url":"https://api.github.com/users/catong/followers","following_url":"https://api.github.com/users/catong/following{/other_user}","gists_url":"https://api.github.com/users/catong/gists{/gist_id}","starred_url":"https://api.github.com/users/catong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/catong/subscriptions","organizations_url":"https://api.github.com/users/catong/orgs","repos_url":"https://api.github.com/users/catong/repos","events_url":"https://api.github.com/users/catong/events{/privacy}","received_events_url":"https://api.github.com/users/catong/received_events","type":"User","site_admin":false},"body":"https://openedx.atlassian.net/browse/DOC-2273\r\nThis PR adds documentation for teams-related SQL tables (https://openedx.atlassian.net/browse/TNL-1965). This PR does not include student/course team events, which are in a separate PR (https://github.com/edx/edx-documentation/pull/535).\r\n\r\nThis feature will be in this week's release, Sept 16. Documentation will not be published on docs.edx.org, but will be shared with PMs and course teams for the teams pilot.\r\n\r\n### Reviewers\r\nCheck the appropriate box after each reviewer finishes and gives :+1:.\r\n- [x] Subject matter expert: @dianakhuang \r\n- [ ] Subject matter expert: @efischer19 \r\n- [x] Doc team review: @lamagnifica \r\n- [ ] Product review: @explorerleslie \r\n- [ ] PM review: Alison Kuryla\r\n\r\n### Draft HTML Documentation\r\n- [x] http://draft-research-guide-teams-events.readthedocs.org/en/latest/internal_data_formats/sql_schema.html#teams-courseteam\r\n\r\n### Post-review\r\n- [ ] Squash commits","created_at":"2015-09-15T21:51:35Z","updated_at":"2015-09-22T18:01:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0d8558efe2e9aacde08cd1994305ecde14d275cc","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/edx/edx-documentation/pulls/555/commits","review_comments_url":"https://api.github.com/repos/edx/edx-documentation/pulls/555/comments","review_comment_url":"https://api.github.com/repos/edx/edx-documentation/pulls/comments{/number}","comments_url":"https://api.github.com/repos/edx/edx-documentation/issues/555/comments","statuses_url":"https://api.github.com/repos/edx/edx-documentation/statuses/6a311f6b914045c4b0b3390b74e032ddb62a5350","head":{"label":"edx:carol/doc/teams_SQLtables","ref":"carol/doc/teams_SQLtables","sha":"6a311f6b914045c4b0b3390b74e032ddb62a5350","user":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"repo":{"id":23839256,"name":"edx-documentation","full_name":"edx/edx-documentation","owner":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/edx/edx-documentation","description":"","fork":false,"url":"https://api.github.com/repos/edx/edx-documentation","forks_url":"https://api.github.com/repos/edx/edx-documentation/forks","keys_url":"https://api.github.com/repos/edx/edx-documentation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edx/edx-documentation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edx/edx-documentation/teams","hooks_url":"https://api.github.com/repos/edx/edx-documentation/hooks","issue_events_url":"https://api.github.com/repos/edx/edx-documentation/issues/events{/number}","events_url":"https://api.github.com/repos/edx/edx-documentation/events","assignees_url":"https://api.github.com/repos/edx/edx-documentation/assignees{/user}","branches_url":"https://api.github.com/repos/edx/edx-documentation/branches{/branch}","tags_url":"https://api.github.com/repos/edx/edx-documentation/tags","blobs_url":"https://api.github.com/repos/edx/edx-documentation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edx/edx-documentation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edx/edx-documentation/git/refs{/sha}","trees_url":"https://api.github.com/repos/edx/edx-documentation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edx/edx-documentation/statuses/{sha}","languages_url":"https://api.github.com/repos/edx/edx-documentation/languages","stargazers_url":"https://api.github.com/repos/edx/edx-documentation/stargazers","contributors_url":"https://api.github.com/repos/edx/edx-documentation/contributors","subscribers_url":"https://api.github.com/repos/edx/edx-documentation/subscribers","subscription_url":"https://api.github.com/repos/edx/edx-documentation/subscription","commits_url":"https://api.github.com/repos/edx/edx-documentation/commits{/sha}","git_commits_url":"https://api.github.com/repos/edx/edx-documentation/git/commits{/sha}","comments_url":"https://api.github.com/repos/edx/edx-documentation/comments{/number}","issue_comment_url":"https://api.github.com/repos/edx/edx-documentation/issues/comments{/number}","contents_url":"https://api.github.com/repos/edx/edx-documentation/contents/{+path}","compare_url":"https://api.github.com/repos/edx/edx-documentation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edx/edx-documentation/merges","archive_url":"https://api.github.com/repos/edx/edx-documentation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edx/edx-documentation/downloads","issues_url":"https://api.github.com/repos/edx/edx-documentation/issues{/number}","pulls_url":"https://api.github.com/repos/edx/edx-documentation/pulls{/number}","milestones_url":"https://api.github.com/repos/edx/edx-documentation/milestones{/number}","notifications_url":"https://api.github.com/repos/edx/edx-documentation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edx/edx-documentation/labels{/name}","releases_url":"https://api.github.com/repos/edx/edx-documentation/releases{/id}","created_at":"2014-09-09T15:29:04Z","updated_at":"2015-09-20T03:16:25Z","pushed_at":"2015-09-22T17:57:19Z","git_url":"git://github.com/edx/edx-documentation.git","ssh_url":"git@github.com:edx/edx-documentation.git","clone_url":"https://github.com/edx/edx-documentation.git","svn_url":"https://github.com/edx/edx-documentation","homepage":null,"size":90172,"stargazers_count":23,"watchers_count":23,"language":"Makefile","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":85,"mirror_url":null,"open_issues_count":29,"forks":85,"open_issues":29,"watchers":23,"default_branch":"master"}},"base":{"label":"edx:master","ref":"master","sha":"51573f8ed0c463abd20d4ec1ea68947d041d88e2","user":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"repo":{"id":23839256,"name":"edx-documentation","full_name":"edx/edx-documentation","owner":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/edx/edx-documentation","description":"","fork":false,"url":"https://api.github.com/repos/edx/edx-documentation","forks_url":"https://api.github.com/repos/edx/edx-documentation/forks","keys_url":"https://api.github.com/repos/edx/edx-documentation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edx/edx-documentation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edx/edx-documentation/teams","hooks_url":"https://api.github.com/repos/edx/edx-documentation/hooks","issue_events_url":"https://api.github.com/repos/edx/edx-documentation/issues/events{/number}","events_url":"https://api.github.com/repos/edx/edx-documentation/events","assignees_url":"https://api.github.com/repos/edx/edx-documentation/assignees{/user}","branches_url":"https://api.github.com/repos/edx/edx-documentation/branches{/branch}","tags_url":"https://api.github.com/repos/edx/edx-documentation/tags","blobs_url":"https://api.github.com/repos/edx/edx-documentation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edx/edx-documentation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edx/edx-documentation/git/refs{/sha}","trees_url":"https://api.github.com/repos/edx/edx-documentation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edx/edx-documentation/statuses/{sha}","languages_url":"https://api.github.com/repos/edx/edx-documentation/languages","stargazers_url":"https://api.github.com/repos/edx/edx-documentation/stargazers","contributors_url":"https://api.github.com/repos/edx/edx-documentation/contributors","subscribers_url":"https://api.github.com/repos/edx/edx-documentation/subscribers","subscription_url":"https://api.github.com/repos/edx/edx-documentation/subscription","commits_url":"https://api.github.com/repos/edx/edx-documentation/commits{/sha}","git_commits_url":"https://api.github.com/repos/edx/edx-documentation/git/commits{/sha}","comments_url":"https://api.github.com/repos/edx/edx-documentation/comments{/number}","issue_comment_url":"https://api.github.com/repos/edx/edx-documentation/issues/comments{/number}","contents_url":"https://api.github.com/repos/edx/edx-documentation/contents/{+path}","compare_url":"https://api.github.com/repos/edx/edx-documentation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edx/edx-documentation/merges","archive_url":"https://api.github.com/repos/edx/edx-documentation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edx/edx-documentation/downloads","issues_url":"https://api.github.com/repos/edx/edx-documentation/issues{/number}","pulls_url":"https://api.github.com/repos/edx/edx-documentation/pulls{/number}","milestones_url":"https://api.github.com/repos/edx/edx-documentation/milestones{/number}","notifications_url":"https://api.github.com/repos/edx/edx-documentation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edx/edx-documentation/labels{/name}","releases_url":"https://api.github.com/repos/edx/edx-documentation/releases{/id}","created_at":"2014-09-09T15:29:04Z","updated_at":"2015-09-20T03:16:25Z","pushed_at":"2015-09-22T17:57:19Z","git_url":"git://github.com/edx/edx-documentation.git","ssh_url":"git@github.com:edx/edx-documentation.git","clone_url":"https://github.com/edx/edx-documentation.git","svn_url":"https://github.com/edx/edx-documentation","homepage":null,"size":90172,"stargazers_count":23,"watchers_count":23,"language":"Makefile","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":85,"mirror_url":null,"open_issues_count":29,"forks":85,"open_issues":29,"watchers":23,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/edx/edx-documentation/pulls/555"},"html":{"href":"https://github.com/edx/edx-documentation/pull/555"},"issue":{"href":"https://api.github.com/repos/edx/edx-documentation/issues/555"},"comments":{"href":"https://api.github.com/repos/edx/edx-documentation/issues/555/comments"},"review_comments":{"href":"https://api.github.com/repos/edx/edx-documentation/pulls/555/comments"},"review_comment":{"href":"https://api.github.com/repos/edx/edx-documentation/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/edx/edx-documentation/pulls/555/commits"},"statuses":{"href":"https://api.github.com/repos/edx/edx-documentation/statuses/6a311f6b914045c4b0b3390b74e032ddb62a5350"}}}}