{"action":"created","comment":{"url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/pulls/comments/29843513","id":29843513,"diff_hunk":"@@ -0,0 +1,82 @@\n+-- h2\n+\n+create table users (\n+\tusersId uuid primary key,\n+\temail varchar(250) not null,\n+\tname varchar,\n+\tusername varchar(50) not null,\n+\t-- TODO: Change after we truly know the hash length - Using SHA(256) for now\n+\tpassword varchar(128) not null,\n+\tprofileImage blob,\n+\tdeleted boolean not null,\n+\tmoderator boolean not null\n+);\n+\n+create table users_users (\n+\tusersId uuid references users(usersId),\n+\tfriendId uuid references users(usersId)\n+);\n+\n+create table coordinates (\n+\tcoordinatesId uuid primary key,\n+\tlatitude decimal not null,\n+\tlongitude decimal not null\n+);\n+\n+create table events (\n+\teventsId uuid primary key,\n+\ttitle varchar(50) not null,\n+\tdescription varchar not null,\n+\tauthor uuid references users(usersId),\n+\tattending int not null,\n+\tinitialDate date not null,\n+\tfinalDate date,\n+\tcoordinatesId uuid references coordinates (coordinatesId)\n+\t-- TODO: Payments, fee?\n+);\n+\n+create table users_events (\n+\tusersId uuid references users(usersId),\n+\teventsId uuid references events(eventsId)\n+);\n+\n+create table comments (\n+\tcommentsId uuid primary key,\n+\t-- ID of parent comment - if it's the same as self, there are no parents\n+\tparentId uuid references comments(commentsId) on delete cascade,","path":"schema.sql","position":49,"original_position":46,"commit_id":"eebffb978d33cab284122dad71f20d7a0dc19654","original_commit_id":"d4ad32b524203ee7ee5b3530eb73e7b7d0493ae2","user":{"login":"ergl","id":3091816,"avatar_url":"https://avatars.githubusercontent.com/u/3091816?v=3","gravatar_id":"","url":"https://api.github.com/users/ergl","html_url":"https://github.com/ergl","followers_url":"https://api.github.com/users/ergl/followers","following_url":"https://api.github.com/users/ergl/following{/other_user}","gists_url":"https://api.github.com/users/ergl/gists{/gist_id}","starred_url":"https://api.github.com/users/ergl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ergl/subscriptions","organizations_url":"https://api.github.com/users/ergl/orgs","repos_url":"https://api.github.com/users/ergl/repos","events_url":"https://api.github.com/users/ergl/events{/privacy}","received_events_url":"https://api.github.com/users/ergl/received_events","type":"User","site_admin":false},"body":"Tienes razón, lo he metido eebffb9.\r\n\r\nLa única pega que le veo es que ahora tenemos dos tablas con distinto significado, pero que contienen exactamente los mismos campos, así que parece que lo mismo hay que repensar un poco cómo lo estamos haciendo.","created_at":"2015-05-07T11:28:07Z","updated_at":"2015-05-07T11:28:07Z","html_url":"https://github.com/SaleOkase/saleokase.github.io/pull/9#discussion_r29843513","pull_request_url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/pulls/9","_links":{"self":{"href":"https://api.github.com/repos/SaleOkase/saleokase.github.io/pulls/comments/29843513"},"html":{"href":"https://github.com/SaleOkase/saleokase.github.io/pull/9#discussion_r29843513"},"pull_request":{"href":"https://api.github.com/repos/SaleOkase/saleokase.github.io/pulls/9"}}},"pull_request":{"url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/pulls/9","id":34109617,"html_url":"https://github.com/SaleOkase/saleokase.github.io/pull/9","diff_url":"https://github.com/SaleOkase/saleokase.github.io/pull/9.diff","patch_url":"https://github.com/SaleOkase/saleokase.github.io/pull/9.patch","issue_url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/issues/9","number":9,"state":"open","locked":false,"title":"Database schema","user":{"login":"ergl","id":3091816,"avatar_url":"https://avatars.githubusercontent.com/u/3091816?v=3","gravatar_id":"","url":"https://api.github.com/users/ergl","html_url":"https://github.com/ergl","followers_url":"https://api.github.com/users/ergl/followers","following_url":"https://api.github.com/users/ergl/following{/other_user}","gists_url":"https://api.github.com/users/ergl/gists{/gist_id}","starred_url":"https://api.github.com/users/ergl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ergl/subscriptions","organizations_url":"https://api.github.com/users/ergl/orgs","repos_url":"https://api.github.com/users/ergl/repos","events_url":"https://api.github.com/users/ergl/events{/privacy}","received_events_url":"https://api.github.com/users/ergl/received_events","type":"User","site_admin":false},"body":"El último día @ximenaNC, @mdquiralte y yo estuvimos hablando de las tablas que habría que crear para la base de datos.\r\n\r\nEn principio se me ha ocurrido este diseño, y salvo por algunas cosas que todavía no sabemos (como la longitud del password de usuario, que dependerá de lo que usemos para el hash) creo que está más o menos.\r\n\r\nCualquier pregunta, duda o sugerencia que tengáis sobre las tablas os agradecería que fuera todo en este hilo. También podéis comentar en el código directamente.\r\n\r\n@SaleOkase/developers ","created_at":"2015-04-25T17:19:37Z","updated_at":"2015-05-07T11:28:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bdcd62cf455a000528f0081bba0879f183a9a7f6","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/pulls/9/commits","review_comments_url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/pulls/9/comments","review_comment_url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/issues/9/comments","statuses_url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/statuses/eebffb978d33cab284122dad71f20d7a0dc19654","head":{"label":"SaleOkase:schema","ref":"schema","sha":"eebffb978d33cab284122dad71f20d7a0dc19654","user":{"login":"SaleOkase","id":11851964,"avatar_url":"https://avatars.githubusercontent.com/u/11851964?v=3","gravatar_id":"","url":"https://api.github.com/users/SaleOkase","html_url":"https://github.com/SaleOkase","followers_url":"https://api.github.com/users/SaleOkase/followers","following_url":"https://api.github.com/users/SaleOkase/following{/other_user}","gists_url":"https://api.github.com/users/SaleOkase/gists{/gist_id}","starred_url":"https://api.github.com/users/SaleOkase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SaleOkase/subscriptions","organizations_url":"https://api.github.com/users/SaleOkase/orgs","repos_url":"https://api.github.com/users/SaleOkase/repos","events_url":"https://api.github.com/users/SaleOkase/events{/privacy}","received_events_url":"https://api.github.com/users/SaleOkase/received_events","type":"Organization","site_admin":false},"repo":{"id":33732264,"name":"saleokase.github.io","full_name":"SaleOkase/saleokase.github.io","owner":{"login":"SaleOkase","id":11851964,"avatar_url":"https://avatars.githubusercontent.com/u/11851964?v=3","gravatar_id":"","url":"https://api.github.com/users/SaleOkase","html_url":"https://github.com/SaleOkase","followers_url":"https://api.github.com/users/SaleOkase/followers","following_url":"https://api.github.com/users/SaleOkase/following{/other_user}","gists_url":"https://api.github.com/users/SaleOkase/gists{/gist_id}","starred_url":"https://api.github.com/users/SaleOkase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SaleOkase/subscriptions","organizations_url":"https://api.github.com/users/SaleOkase/orgs","repos_url":"https://api.github.com/users/SaleOkase/repos","events_url":"https://api.github.com/users/SaleOkase/events{/privacy}","received_events_url":"https://api.github.com/users/SaleOkase/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SaleOkase/saleokase.github.io","description":"","fork":false,"url":"https://api.github.com/repos/SaleOkase/saleokase.github.io","forks_url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/forks","keys_url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/teams","hooks_url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/hooks","issue_events_url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/issues/events{/number}","events_url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/events","assignees_url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/assignees{/user}","branches_url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/branches{/branch}","tags_url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/tags","blobs_url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/statuses/{sha}","languages_url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/languages","stargazers_url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/stargazers","contributors_url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/contributors","subscribers_url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/subscribers","subscription_url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/subscription","commits_url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/contents/{+path}","compare_url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/merges","archive_url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/downloads","issues_url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/issues{/number}","pulls_url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/pulls{/number}","milestones_url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/milestones{/number}","notifications_url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/labels{/name}","releases_url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/releases{/id}","created_at":"2015-04-10T14:18:23Z","updated_at":"2015-04-27T15:51:42Z","pushed_at":"2015-05-07T11:24:53Z","git_url":"git://github.com/SaleOkase/saleokase.github.io.git","ssh_url":"git@github.com:SaleOkase/saleokase.github.io.git","clone_url":"https://github.com/SaleOkase/saleokase.github.io.git","svn_url":"https://github.com/SaleOkase/saleokase.github.io","homepage":"saleokase.github.io","size":1111,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":4,"mirror_url":null,"open_issues_count":2,"forks":4,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"SaleOkase:master","ref":"master","sha":"1098b19bc16743df07eec42ab64dfa3f4378f3db","user":{"login":"SaleOkase","id":11851964,"avatar_url":"https://avatars.githubusercontent.com/u/11851964?v=3","gravatar_id":"","url":"https://api.github.com/users/SaleOkase","html_url":"https://github.com/SaleOkase","followers_url":"https://api.github.com/users/SaleOkase/followers","following_url":"https://api.github.com/users/SaleOkase/following{/other_user}","gists_url":"https://api.github.com/users/SaleOkase/gists{/gist_id}","starred_url":"https://api.github.com/users/SaleOkase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SaleOkase/subscriptions","organizations_url":"https://api.github.com/users/SaleOkase/orgs","repos_url":"https://api.github.com/users/SaleOkase/repos","events_url":"https://api.github.com/users/SaleOkase/events{/privacy}","received_events_url":"https://api.github.com/users/SaleOkase/received_events","type":"Organization","site_admin":false},"repo":{"id":33732264,"name":"saleokase.github.io","full_name":"SaleOkase/saleokase.github.io","owner":{"login":"SaleOkase","id":11851964,"avatar_url":"https://avatars.githubusercontent.com/u/11851964?v=3","gravatar_id":"","url":"https://api.github.com/users/SaleOkase","html_url":"https://github.com/SaleOkase","followers_url":"https://api.github.com/users/SaleOkase/followers","following_url":"https://api.github.com/users/SaleOkase/following{/other_user}","gists_url":"https://api.github.com/users/SaleOkase/gists{/gist_id}","starred_url":"https://api.github.com/users/SaleOkase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SaleOkase/subscriptions","organizations_url":"https://api.github.com/users/SaleOkase/orgs","repos_url":"https://api.github.com/users/SaleOkase/repos","events_url":"https://api.github.com/users/SaleOkase/events{/privacy}","received_events_url":"https://api.github.com/users/SaleOkase/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SaleOkase/saleokase.github.io","description":"","fork":false,"url":"https://api.github.com/repos/SaleOkase/saleokase.github.io","forks_url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/forks","keys_url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/teams","hooks_url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/hooks","issue_events_url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/issues/events{/number}","events_url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/events","assignees_url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/assignees{/user}","branches_url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/branches{/branch}","tags_url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/tags","blobs_url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/statuses/{sha}","languages_url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/languages","stargazers_url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/stargazers","contributors_url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/contributors","subscribers_url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/subscribers","subscription_url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/subscription","commits_url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/contents/{+path}","compare_url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/merges","archive_url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/downloads","issues_url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/issues{/number}","pulls_url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/pulls{/number}","milestones_url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/milestones{/number}","notifications_url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/labels{/name}","releases_url":"https://api.github.com/repos/SaleOkase/saleokase.github.io/releases{/id}","created_at":"2015-04-10T14:18:23Z","updated_at":"2015-04-27T15:51:42Z","pushed_at":"2015-05-07T11:24:53Z","git_url":"git://github.com/SaleOkase/saleokase.github.io.git","ssh_url":"git@github.com:SaleOkase/saleokase.github.io.git","clone_url":"https://github.com/SaleOkase/saleokase.github.io.git","svn_url":"https://github.com/SaleOkase/saleokase.github.io","homepage":"saleokase.github.io","size":1111,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":4,"mirror_url":null,"open_issues_count":2,"forks":4,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SaleOkase/saleokase.github.io/pulls/9"},"html":{"href":"https://github.com/SaleOkase/saleokase.github.io/pull/9"},"issue":{"href":"https://api.github.com/repos/SaleOkase/saleokase.github.io/issues/9"},"comments":{"href":"https://api.github.com/repos/SaleOkase/saleokase.github.io/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/SaleOkase/saleokase.github.io/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/SaleOkase/saleokase.github.io/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SaleOkase/saleokase.github.io/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/SaleOkase/saleokase.github.io/statuses/eebffb978d33cab284122dad71f20d7a0dc19654"}}}}