{"action":"created","comment":{"url":"https://api.github.com/repos/probcomp/bayeslite/pulls/comments/41539653","id":41539653,"diff_hunk":"@@ -87,7 +88,26 @@\n CREATE UNIQUE INDEX bayesdb_generator_i_default ON bayesdb_generator (tabname)\n     WHERE defaultp;\n '''\n-\f\n+\n+bayesdb_schema_upgrade[6] = '''\n+PRAGMA user_version = 7;\n+\n+CREATE TABLE bayesdb_session (\n+\tid\t\tINTEGER NOT NULL PRIMARY KEY AUTOINCREMENT\n+\t\t\t\tCHECK (0 < id),\n+\tsent\t\tBOOLEAN DEFAULT 0\n+);\n+CREATE TABLE bayesdb_session_entries (\n+\tid\t\tINTEGER NOT NULL PRIMARY KEY AUTOINCREMENT\n+\t\t\t\tCHECK (0 < id),\n+\tsession_id\tINTEGER NOT NULL REFERENCES bayesdb_session(id),\n+\ttime\t\tINTEGER NOT NULL, -- Unix time.","path":"src/schema.py","position":28,"original_position":28,"commit_id":"709388852666de7f68cb9ffe80ddef3fbece98dc","original_commit_id":"5bf7063188cfb7c3287330b927922fcbbb10d837","user":{"login":"riastradh-probcomp","id":8646066,"avatar_url":"https://avatars.githubusercontent.com/u/8646066?v=3","gravatar_id":"","url":"https://api.github.com/users/riastradh-probcomp","html_url":"https://github.com/riastradh-probcomp","followers_url":"https://api.github.com/users/riastradh-probcomp/followers","following_url":"https://api.github.com/users/riastradh-probcomp/following{/other_user}","gists_url":"https://api.github.com/users/riastradh-probcomp/gists{/gist_id}","starred_url":"https://api.github.com/users/riastradh-probcomp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/riastradh-probcomp/subscriptions","organizations_url":"https://api.github.com/users/riastradh-probcomp/orgs","repos_url":"https://api.github.com/users/riastradh-probcomp/repos","events_url":"https://api.github.com/users/riastradh-probcomp/events{/privacy}","received_events_url":"https://api.github.com/users/riastradh-probcomp/received_events","type":"User","site_admin":false},"body":"It might be more appropriate to use DATE, rather than INTEGER, here.  I'm not sure it is -- but sqlite3 has some native support for doing nice things with dates that we might be able to usefully exploit.\r\n\r\nI didn't fully understand @gregory-marton's question, but in case this may answer it: in sqlite3, INTEGER can represent any quantities in [-2^63, 2^63), so it is adequate for storing POSIX time stamps.","created_at":"2015-10-08T17:02:11Z","updated_at":"2015-10-08T17:02:11Z","html_url":"https://github.com/probcomp/bayeslite/pull/231#discussion_r41539653","pull_request_url":"https://api.github.com/repos/probcomp/bayeslite/pulls/231","_links":{"self":{"href":"https://api.github.com/repos/probcomp/bayeslite/pulls/comments/41539653"},"html":{"href":"https://github.com/probcomp/bayeslite/pull/231#discussion_r41539653"},"pull_request":{"href":"https://api.github.com/repos/probcomp/bayeslite/pulls/231"}}},"pull_request":{"url":"https://api.github.com/repos/probcomp/bayeslite/pulls/231","id":46949650,"html_url":"https://github.com/probcomp/bayeslite/pull/231","diff_url":"https://github.com/probcomp/bayeslite/pull/231.diff","patch_url":"https://github.com/probcomp/bayeslite/pull/231.patch","issue_url":"https://api.github.com/repos/probcomp/bayeslite/issues/231","number":231,"state":"closed","locked":false,"title":"20151002 marcoct sessions","user":{"login":"gregory-marton","id":5065456,"avatar_url":"https://avatars.githubusercontent.com/u/5065456?v=3","gravatar_id":"","url":"https://api.github.com/users/gregory-marton","html_url":"https://github.com/gregory-marton","followers_url":"https://api.github.com/users/gregory-marton/followers","following_url":"https://api.github.com/users/gregory-marton/following{/other_user}","gists_url":"https://api.github.com/users/gregory-marton/gists{/gist_id}","starred_url":"https://api.github.com/users/gregory-marton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gregory-marton/subscriptions","organizations_url":"https://api.github.com/users/gregory-marton/orgs","repos_url":"https://api.github.com/users/gregory-marton/repos","events_url":"https://api.github.com/users/gregory-marton/events{/privacy}","received_events_url":"https://api.github.com/users/gregory-marton/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-10-06T19:55:53Z","updated_at":"2015-10-08T17:02:12Z","closed_at":"2015-10-07T14:25:59Z","merged_at":"2015-10-07T14:25:59Z","merge_commit_sha":"94092e2bbac2c6723e368897045f8614f3faf968","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/probcomp/bayeslite/pulls/231/commits","review_comments_url":"https://api.github.com/repos/probcomp/bayeslite/pulls/231/comments","review_comment_url":"https://api.github.com/repos/probcomp/bayeslite/pulls/comments{/number}","comments_url":"https://api.github.com/repos/probcomp/bayeslite/issues/231/comments","statuses_url":"https://api.github.com/repos/probcomp/bayeslite/statuses/709388852666de7f68cb9ffe80ddef3fbece98dc","head":{"label":"probcomp:20151002-marcoct-sessions","ref":"20151002-marcoct-sessions","sha":"709388852666de7f68cb9ffe80ddef3fbece98dc","user":{"login":"probcomp","id":1438632,"avatar_url":"https://avatars.githubusercontent.com/u/1438632?v=3","gravatar_id":"","url":"https://api.github.com/users/probcomp","html_url":"https://github.com/probcomp","followers_url":"https://api.github.com/users/probcomp/followers","following_url":"https://api.github.com/users/probcomp/following{/other_user}","gists_url":"https://api.github.com/users/probcomp/gists{/gist_id}","starred_url":"https://api.github.com/users/probcomp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/probcomp/subscriptions","organizations_url":"https://api.github.com/users/probcomp/orgs","repos_url":"https://api.github.com/users/probcomp/repos","events_url":"https://api.github.com/users/probcomp/events{/privacy}","received_events_url":"https://api.github.com/users/probcomp/received_events","type":"Organization","site_admin":false},"repo":{"id":25949241,"name":"bayeslite","full_name":"probcomp/bayeslite","owner":{"login":"probcomp","id":1438632,"avatar_url":"https://avatars.githubusercontent.com/u/1438632?v=3","gravatar_id":"","url":"https://api.github.com/users/probcomp","html_url":"https://github.com/probcomp","followers_url":"https://api.github.com/users/probcomp/followers","following_url":"https://api.github.com/users/probcomp/following{/other_user}","gists_url":"https://api.github.com/users/probcomp/gists{/gist_id}","starred_url":"https://api.github.com/users/probcomp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/probcomp/subscriptions","organizations_url":"https://api.github.com/users/probcomp/orgs","repos_url":"https://api.github.com/users/probcomp/repos","events_url":"https://api.github.com/users/probcomp/events{/privacy}","received_events_url":"https://api.github.com/users/probcomp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/probcomp/bayeslite","description":"BayesDB on SQLite. A Bayesian database table for querying the probable implications of data as easily as SQL databases query the data itself.","fork":false,"url":"https://api.github.com/repos/probcomp/bayeslite","forks_url":"https://api.github.com/repos/probcomp/bayeslite/forks","keys_url":"https://api.github.com/repos/probcomp/bayeslite/keys{/key_id}","collaborators_url":"https://api.github.com/repos/probcomp/bayeslite/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/probcomp/bayeslite/teams","hooks_url":"https://api.github.com/repos/probcomp/bayeslite/hooks","issue_events_url":"https://api.github.com/repos/probcomp/bayeslite/issues/events{/number}","events_url":"https://api.github.com/repos/probcomp/bayeslite/events","assignees_url":"https://api.github.com/repos/probcomp/bayeslite/assignees{/user}","branches_url":"https://api.github.com/repos/probcomp/bayeslite/branches{/branch}","tags_url":"https://api.github.com/repos/probcomp/bayeslite/tags","blobs_url":"https://api.github.com/repos/probcomp/bayeslite/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/probcomp/bayeslite/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/probcomp/bayeslite/git/refs{/sha}","trees_url":"https://api.github.com/repos/probcomp/bayeslite/git/trees{/sha}","statuses_url":"https://api.github.com/repos/probcomp/bayeslite/statuses/{sha}","languages_url":"https://api.github.com/repos/probcomp/bayeslite/languages","stargazers_url":"https://api.github.com/repos/probcomp/bayeslite/stargazers","contributors_url":"https://api.github.com/repos/probcomp/bayeslite/contributors","subscribers_url":"https://api.github.com/repos/probcomp/bayeslite/subscribers","subscription_url":"https://api.github.com/repos/probcomp/bayeslite/subscription","commits_url":"https://api.github.com/repos/probcomp/bayeslite/commits{/sha}","git_commits_url":"https://api.github.com/repos/probcomp/bayeslite/git/commits{/sha}","comments_url":"https://api.github.com/repos/probcomp/bayeslite/comments{/number}","issue_comment_url":"https://api.github.com/repos/probcomp/bayeslite/issues/comments{/number}","contents_url":"https://api.github.com/repos/probcomp/bayeslite/contents/{+path}","compare_url":"https://api.github.com/repos/probcomp/bayeslite/compare/{base}...{head}","merges_url":"https://api.github.com/repos/probcomp/bayeslite/merges","archive_url":"https://api.github.com/repos/probcomp/bayeslite/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/probcomp/bayeslite/downloads","issues_url":"https://api.github.com/repos/probcomp/bayeslite/issues{/number}","pulls_url":"https://api.github.com/repos/probcomp/bayeslite/pulls{/number}","milestones_url":"https://api.github.com/repos/probcomp/bayeslite/milestones{/number}","notifications_url":"https://api.github.com/repos/probcomp/bayeslite/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/probcomp/bayeslite/labels{/name}","releases_url":"https://api.github.com/repos/probcomp/bayeslite/releases{/id}","created_at":"2014-10-30T01:26:34Z","updated_at":"2015-10-08T05:19:35Z","pushed_at":"2015-10-08T15:50:07Z","git_url":"git://github.com/probcomp/bayeslite.git","ssh_url":"git@github.com:probcomp/bayeslite.git","clone_url":"https://github.com/probcomp/bayeslite.git","svn_url":"https://github.com/probcomp/bayeslite","homepage":"http://probcomp.csail.mit.edu/bayesdb","size":6632,"stargazers_count":18,"watchers_count":18,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":120,"forks":0,"open_issues":120,"watchers":18,"default_branch":"master"}},"base":{"label":"probcomp:sessions","ref":"sessions","sha":"1043957bb8bcdc22d24252616a78bddf1e72b345","user":{"login":"probcomp","id":1438632,"avatar_url":"https://avatars.githubusercontent.com/u/1438632?v=3","gravatar_id":"","url":"https://api.github.com/users/probcomp","html_url":"https://github.com/probcomp","followers_url":"https://api.github.com/users/probcomp/followers","following_url":"https://api.github.com/users/probcomp/following{/other_user}","gists_url":"https://api.github.com/users/probcomp/gists{/gist_id}","starred_url":"https://api.github.com/users/probcomp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/probcomp/subscriptions","organizations_url":"https://api.github.com/users/probcomp/orgs","repos_url":"https://api.github.com/users/probcomp/repos","events_url":"https://api.github.com/users/probcomp/events{/privacy}","received_events_url":"https://api.github.com/users/probcomp/received_events","type":"Organization","site_admin":false},"repo":{"id":25949241,"name":"bayeslite","full_name":"probcomp/bayeslite","owner":{"login":"probcomp","id":1438632,"avatar_url":"https://avatars.githubusercontent.com/u/1438632?v=3","gravatar_id":"","url":"https://api.github.com/users/probcomp","html_url":"https://github.com/probcomp","followers_url":"https://api.github.com/users/probcomp/followers","following_url":"https://api.github.com/users/probcomp/following{/other_user}","gists_url":"https://api.github.com/users/probcomp/gists{/gist_id}","starred_url":"https://api.github.com/users/probcomp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/probcomp/subscriptions","organizations_url":"https://api.github.com/users/probcomp/orgs","repos_url":"https://api.github.com/users/probcomp/repos","events_url":"https://api.github.com/users/probcomp/events{/privacy}","received_events_url":"https://api.github.com/users/probcomp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/probcomp/bayeslite","description":"BayesDB on SQLite. A Bayesian database table for querying the probable implications of data as easily as SQL databases query the data itself.","fork":false,"url":"https://api.github.com/repos/probcomp/bayeslite","forks_url":"https://api.github.com/repos/probcomp/bayeslite/forks","keys_url":"https://api.github.com/repos/probcomp/bayeslite/keys{/key_id}","collaborators_url":"https://api.github.com/repos/probcomp/bayeslite/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/probcomp/bayeslite/teams","hooks_url":"https://api.github.com/repos/probcomp/bayeslite/hooks","issue_events_url":"https://api.github.com/repos/probcomp/bayeslite/issues/events{/number}","events_url":"https://api.github.com/repos/probcomp/bayeslite/events","assignees_url":"https://api.github.com/repos/probcomp/bayeslite/assignees{/user}","branches_url":"https://api.github.com/repos/probcomp/bayeslite/branches{/branch}","tags_url":"https://api.github.com/repos/probcomp/bayeslite/tags","blobs_url":"https://api.github.com/repos/probcomp/bayeslite/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/probcomp/bayeslite/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/probcomp/bayeslite/git/refs{/sha}","trees_url":"https://api.github.com/repos/probcomp/bayeslite/git/trees{/sha}","statuses_url":"https://api.github.com/repos/probcomp/bayeslite/statuses/{sha}","languages_url":"https://api.github.com/repos/probcomp/bayeslite/languages","stargazers_url":"https://api.github.com/repos/probcomp/bayeslite/stargazers","contributors_url":"https://api.github.com/repos/probcomp/bayeslite/contributors","subscribers_url":"https://api.github.com/repos/probcomp/bayeslite/subscribers","subscription_url":"https://api.github.com/repos/probcomp/bayeslite/subscription","commits_url":"https://api.github.com/repos/probcomp/bayeslite/commits{/sha}","git_commits_url":"https://api.github.com/repos/probcomp/bayeslite/git/commits{/sha}","comments_url":"https://api.github.com/repos/probcomp/bayeslite/comments{/number}","issue_comment_url":"https://api.github.com/repos/probcomp/bayeslite/issues/comments{/number}","contents_url":"https://api.github.com/repos/probcomp/bayeslite/contents/{+path}","compare_url":"https://api.github.com/repos/probcomp/bayeslite/compare/{base}...{head}","merges_url":"https://api.github.com/repos/probcomp/bayeslite/merges","archive_url":"https://api.github.com/repos/probcomp/bayeslite/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/probcomp/bayeslite/downloads","issues_url":"https://api.github.com/repos/probcomp/bayeslite/issues{/number}","pulls_url":"https://api.github.com/repos/probcomp/bayeslite/pulls{/number}","milestones_url":"https://api.github.com/repos/probcomp/bayeslite/milestones{/number}","notifications_url":"https://api.github.com/repos/probcomp/bayeslite/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/probcomp/bayeslite/labels{/name}","releases_url":"https://api.github.com/repos/probcomp/bayeslite/releases{/id}","created_at":"2014-10-30T01:26:34Z","updated_at":"2015-10-08T05:19:35Z","pushed_at":"2015-10-08T15:50:07Z","git_url":"git://github.com/probcomp/bayeslite.git","ssh_url":"git@github.com:probcomp/bayeslite.git","clone_url":"https://github.com/probcomp/bayeslite.git","svn_url":"https://github.com/probcomp/bayeslite","homepage":"http://probcomp.csail.mit.edu/bayesdb","size":6632,"stargazers_count":18,"watchers_count":18,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":120,"forks":0,"open_issues":120,"watchers":18,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/probcomp/bayeslite/pulls/231"},"html":{"href":"https://github.com/probcomp/bayeslite/pull/231"},"issue":{"href":"https://api.github.com/repos/probcomp/bayeslite/issues/231"},"comments":{"href":"https://api.github.com/repos/probcomp/bayeslite/issues/231/comments"},"review_comments":{"href":"https://api.github.com/repos/probcomp/bayeslite/pulls/231/comments"},"review_comment":{"href":"https://api.github.com/repos/probcomp/bayeslite/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/probcomp/bayeslite/pulls/231/commits"},"statuses":{"href":"https://api.github.com/repos/probcomp/bayeslite/statuses/709388852666de7f68cb9ffe80ddef3fbece98dc"}}}}