{"action":"created","issue":{"url":"https://api.github.com/repos/ppy/osu-web/issues/392","repository_url":"https://api.github.com/repos/ppy/osu-web","labels_url":"https://api.github.com/repos/ppy/osu-web/issues/392/labels{/name}","comments_url":"https://api.github.com/repos/ppy/osu-web/issues/392/comments","events_url":"https://api.github.com/repos/ppy/osu-web/issues/392/events","html_url":"https://github.com/ppy/osu-web/pull/392","id":135109272,"number":392,"title":"Add Seeders for Users/Stats/Beatmaps/Forum/Misc data #20","user":{"login":"Hughp135","id":12624925,"avatar_url":"https://avatars.githubusercontent.com/u/12624925?v=3","gravatar_id":"","url":"https://api.github.com/users/Hughp135","html_url":"https://github.com/Hughp135","followers_url":"https://api.github.com/users/Hughp135/followers","following_url":"https://api.github.com/users/Hughp135/following{/other_user}","gists_url":"https://api.github.com/users/Hughp135/gists{/gist_id}","starred_url":"https://api.github.com/users/Hughp135/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hughp135/subscriptions","organizations_url":"https://api.github.com/users/Hughp135/orgs","repos_url":"https://api.github.com/users/Hughp135/repos","events_url":"https://api.github.com/users/Hughp135/events{/privacy}","received_events_url":"https://api.github.com/users/Hughp135/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":44,"created_at":"2016-02-20T18:43:40Z","updated_at":"2016-03-10T11:40:17Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ppy/osu-web/pulls/392","html_url":"https://github.com/ppy/osu-web/pull/392","diff_url":"https://github.com/ppy/osu-web/pull/392.diff","patch_url":"https://github.com/ppy/osu-web/pull/392.patch"},"body":"Added a seeder. This will use the osu api (with the help of your api key) to seed 500 real beatmaps, some from all game modes. It will then generate fake users and fill our their profiles with appropriate data (using the beatmaps imported from the api). If an API key isn't set, it will still seed what it can (e.g. users and some profile data).\r\n\r\nNote: this deletes some tables before reseeding so if you want to make sure you don't lose any of your test data, back up your db first. Most tables (beatmaps/users/beatmaps/forums) aren't deleted unless they by chance have the same primary key(s) as the seed data.\r\n\r\nSummary of changes:\r\n\r\n- Tables that are seeded: phpbb_users, phpbb_user_stats, osu_beatmaps, osu_beatmapsets, osu_events, osu_leaders, osu_scores, osu_scores_high,  phpbb_forums, phpbb_topics, phpbb_posts, osu_user_beatmap_playcount, osu_favouritemaps\r\n\r\n- A few model changes that were necessary for the seeder (and possibly in general)\r\n\r\n- Added more statements to the sql dumps, as those fields were required.\r\n\r\n- Added \"php artisan db:seed\" command to build.sh [edit: removed this command] .\r\n\r\n- Environment variable 'OSU_API' will take your osu api key to seed beatmaps.\r\n\r\n- Seeder makes a log file of all data imported from the jsons (in /database/data/json/log.txt)\r\n\r\n- The password for every user is 'password' and they are all admins\r\n\r\n\r\nThings left to seed: Everything osu-store related. More user profile details (website, playstyle, playmode, personal editable profile section etc)\r\n\r\n\r\nP.S. if anyone's interested in seeing how I used data obtained from the osu API to generate jsons/zip files, check out https://gist.github.com/Hughp135/8386cde4fb0e196f85b7"},"comment":{"url":"https://api.github.com/repos/ppy/osu-web/issues/comments/194802979","html_url":"https://github.com/ppy/osu-web/pull/392#issuecomment-194802979","issue_url":"https://api.github.com/repos/ppy/osu-web/issues/392","id":194802979,"user":{"login":"nanaya","id":276295,"avatar_url":"https://avatars.githubusercontent.com/u/276295?v=3","gravatar_id":"","url":"https://api.github.com/users/nanaya","html_url":"https://github.com/nanaya","followers_url":"https://api.github.com/users/nanaya/followers","following_url":"https://api.github.com/users/nanaya/following{/other_user}","gists_url":"https://api.github.com/users/nanaya/gists{/gist_id}","starred_url":"https://api.github.com/users/nanaya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nanaya/subscriptions","organizations_url":"https://api.github.com/users/nanaya/orgs","repos_url":"https://api.github.com/users/nanaya/repos","events_url":"https://api.github.com/users/nanaya/events{/privacy}","received_events_url":"https://api.github.com/users/nanaya/received_events","type":"User","site_admin":false},"created_at":"2016-03-10T11:40:17Z","updated_at":"2016-03-10T11:40:17Z","body":"the intention isn't to make it faster but to make it less confusing to read."}}