{"action":"created","issue":{"url":"https://api.github.com/repos/davidguerreiro/evscalculator/issues/10","labels_url":"https://api.github.com/repos/davidguerreiro/evscalculator/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/davidguerreiro/evscalculator/issues/10/comments","events_url":"https://api.github.com/repos/davidguerreiro/evscalculator/issues/10/events","html_url":"https://github.com/davidguerreiro/evscalculator/issues/10","id":117014993,"number":10,"title":"DB structure","user":{"login":"jaicab","id":1174434,"avatar_url":"https://avatars.githubusercontent.com/u/1174434?v=3","gravatar_id":"","url":"https://api.github.com/users/jaicab","html_url":"https://github.com/jaicab","followers_url":"https://api.github.com/users/jaicab/followers","following_url":"https://api.github.com/users/jaicab/following{/other_user}","gists_url":"https://api.github.com/users/jaicab/gists{/gist_id}","starred_url":"https://api.github.com/users/jaicab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaicab/subscriptions","organizations_url":"https://api.github.com/users/jaicab/orgs","repos_url":"https://api.github.com/users/jaicab/repos","events_url":"https://api.github.com/users/jaicab/events{/privacy}","received_events_url":"https://api.github.com/users/jaicab/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/davidguerreiro/evscalculator/labels/DB","name":"DB","color":"d4c5f9"}],"state":"open","locked":false,"assignee":{"login":"davidguerreiro","id":9396157,"avatar_url":"https://avatars.githubusercontent.com/u/9396157?v=3","gravatar_id":"","url":"https://api.github.com/users/davidguerreiro","html_url":"https://github.com/davidguerreiro","followers_url":"https://api.github.com/users/davidguerreiro/followers","following_url":"https://api.github.com/users/davidguerreiro/following{/other_user}","gists_url":"https://api.github.com/users/davidguerreiro/gists{/gist_id}","starred_url":"https://api.github.com/users/davidguerreiro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidguerreiro/subscriptions","organizations_url":"https://api.github.com/users/davidguerreiro/orgs","repos_url":"https://api.github.com/users/davidguerreiro/repos","events_url":"https://api.github.com/users/davidguerreiro/events{/privacy}","received_events_url":"https://api.github.com/users/davidguerreiro/received_events","type":"User","site_admin":false},"milestone":null,"comments":8,"created_at":"2015-11-15T20:18:49Z","updated_at":"2015-11-27T12:05:52Z","closed_at":null,"body":"#### Database\r\n\r\n**Training**: Training table saves all the data for a single training session. \r\n\r\nField | Type | Description\r\n---- | ---- | ----\r\n**id** | INT(11) NOT_NULL AUTO_INCREMENT | Identification number\r\n**id_url** | VARCHAR(255) DEFAULT NULL | Url which allows users to load an unfinished training.\r\n**id_user** | INT(11) NOT_NULL DEFAULT 0 | User number. This value will be always 0 because the first version doesn't support user creation\r\n**hp** | INT(3) NOT_NULL DEFAULT 0 | Hp stat value\r\n**attack** | INT(3) NOT_NULL DEFAULT 0 | Attack stat value\r\n**defense** | INT(3) NOT_NULL DEFAULT 0 | Defense stat value\r\n**spattack** | INT(3) NOT_NULL DEFAULT 0 | Sp Attack stat value\r\n**spdefense** | INT(3) NOT_NULL DEFAULT 0 | Sp Defense stat value\r\n**speed** | INT(3) NOT_NULL DEFAULT 0 | Speed stat value\r\n**version** | VARCHAR(50) NOT_NULL DEFAULT 'xy' | Pokemon 6th gen game version ('xy' -- XY Pokemon games, 'oras' -- Ruby Omega Alpha Sapphire Pokemon Games)\r\n**pokerus** | TINYINT(1) NOT_NULL DEFAULT 0 | Pokerus (0 -- disabled, 1 -- enabled)\r\n**power_brace** | TINYINT(1) NOT_NULL DEFAULT 0 | Power brace (0 -- unequipped, 1 -- equipped)\r\n**sturdy_object** | TINYINT(1) NOT_NULL DEFAULT 0 | Sturdy object (0 -- unequipped, 1 -- equipped)\r\n**timestamp** | TIMESTAMP |\r\n\r\n\r\n\r\n**Records**: Records will provide us with information about how users are using the application, which version of the game is the most used and more\r\n\r\nField | Type | Description\r\n---- | ---- | ----\r\n**id** | INT(11) NOT_NULL AUTO_INCREMENT | Identification number\r\n**id_training** | INT(11) NOT_NULL DEFAULT 0 | This id related the record with a single training session\r\n**stat_name** | VARCHAR(50) | Name of the stat what we are adding or decreasing the value\r\n**stat_value** | INT(3) NOT_NULL DEFAULT 0 | Amont of evs that we are adding or subtracting\r\n**id_horde** | INT(11) NOT_NULL DEFAULT 0 | The ID of the horde when a horde has been used during the training session\r\n**id_vitamin** | INT(11) NOT_NULL DEFAULT 0 | The ID of the vitamin when a vitamin has been used during the training session\r\n**version** | VARCHAR(50) NOT_NULL DEFAULT 'xy' | Pokemon 6th gen game version ('xy' -- XY Pokemon games, 'oras' -- Ruby Omega Alpha Sapphire Pokemon Games)\r\n**pokerus** | TINYINT(1) NOT_NULL DEFAULT 0 | Pokerus (0 -- disabled, 1 -- enabled)\r\n**timestamp** | TIMESTAMP |\r\n\r\n\r\n**Hordes**: Hordes saves the number of times that every horde has been used during the training sessions\r\n\r\nField | Type | Description\r\n---- | ---- | ----\r\n**id** | INT(11) NOT_NULL AUTO_INCREMENT | Identification number\r\n**name** | VARCHAR(50) NOT_NULL DEFAULT '' | The name of the pokemon who appears in this horde\r\n**stat_name** | VARCHAR(50) NOT NULL DEFAULT ''- | The name of the stat that the horde belongs to\r\n**version** | VARCHAR(50) NOT_NULL DEFAULT 'xy' - | Pokemon 6th gen game version ('xy' -- XY Pokemon games, 'oras' -- Ruby Omega Alpha Sapphire Pokemon Games)\r\n\r\n\r\n\r\n**Vitamins**: Vitamins saves the number of times that every vitamin has been used during the training sessions.\r\n\r\nField | Type | Description\r\n---- | ---- | ----\r\n**id** | INT(11) NOT_NULL AUTO_INCREMENT | Identification number\r\n**name** | VARCHAR(50) NOT_NULL DEFAULT ''| The name of the vitamin\r\n**stat_name** | VARCHAR(50) NOT NULL DEFAULT ''| The name of the stat that the vitamin belongs to\r\n\r\n\r\n**User**: First approach of the User basic table. Not used in the first version.\r\n\r\nField | Type | Description\r\n---- | ---- | ----\r\n**id** | INT(11) NOT_NULL AUTO_INCREMENT | Identification number\r\n**name** | VARCHAR(50) NOT_NULL DEFAULT ''| The name of the user\r\n**email** | VARCHAR(255) NOT_NULL DEFAULT '' | The email address of the user\r\n\r\nPlease check the new database diagram, make and comment any change that you consider relevant ASAP because **I'm going to install and test the DB in the server tomorrow in the morning**.\r\n\r\nThanks.\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/davidguerreiro/evscalculator/issues/comments/160124771","html_url":"https://github.com/davidguerreiro/evscalculator/issues/10#issuecomment-160124771","issue_url":"https://api.github.com/repos/davidguerreiro/evscalculator/issues/10","id":160124771,"user":{"login":"jaicab","id":1174434,"avatar_url":"https://avatars.githubusercontent.com/u/1174434?v=3","gravatar_id":"","url":"https://api.github.com/users/jaicab","html_url":"https://github.com/jaicab","followers_url":"https://api.github.com/users/jaicab/followers","following_url":"https://api.github.com/users/jaicab/following{/other_user}","gists_url":"https://api.github.com/users/jaicab/gists{/gist_id}","starred_url":"https://api.github.com/users/jaicab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaicab/subscriptions","organizations_url":"https://api.github.com/users/jaicab/orgs","repos_url":"https://api.github.com/users/jaicab/repos","events_url":"https://api.github.com/users/jaicab/events{/privacy}","received_events_url":"https://api.github.com/users/jaicab/received_events","type":"User","site_admin":false},"created_at":"2015-11-27T12:05:52Z","updated_at":"2015-11-27T12:05:52Z","body":"Glad you got the idea. I also think it should be a JSON file with the hordes and another with the vitamins, and then we process that with PHP so it's easily available. I say JSON because we can cache it and it would be instantaneous, but giving us the flexibility to do other stuff."}}