{"action":"created","issue":{"url":"https://api.github.com/repos/mezuro/kalibro_processor/issues/215","repository_url":"https://api.github.com/repos/mezuro/kalibro_processor","labels_url":"https://api.github.com/repos/mezuro/kalibro_processor/issues/215/labels{/name}","comments_url":"https://api.github.com/repos/mezuro/kalibro_processor/issues/215/comments","events_url":"https://api.github.com/repos/mezuro/kalibro_processor/issues/215/events","html_url":"https://github.com/mezuro/kalibro_processor/pull/215","id":166313468,"number":215,"title":"Overhaul database schema","user":{"login":"danielkza","id":747342,"avatar_url":"https://avatars.githubusercontent.com/u/747342?v=3","gravatar_id":"","url":"https://api.github.com/users/danielkza","html_url":"https://github.com/danielkza","followers_url":"https://api.github.com/users/danielkza/followers","following_url":"https://api.github.com/users/danielkza/following{/other_user}","gists_url":"https://api.github.com/users/danielkza/gists{/gist_id}","starred_url":"https://api.github.com/users/danielkza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielkza/subscriptions","organizations_url":"https://api.github.com/users/danielkza/orgs","repos_url":"https://api.github.com/users/danielkza/repos","events_url":"https://api.github.com/users/danielkza/events{/privacy}","received_events_url":"https://api.github.com/users/danielkza/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mezuro/kalibro_processor/labels/in%20progress","name":"in progress","color":"ededed"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2016-07-19T11:57:42Z","updated_at":"2016-07-19T22:03:25Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mezuro/kalibro_processor/pulls/215","html_url":"https://github.com/mezuro/kalibro_processor/pull/215","diff_url":"https://github.com/mezuro/kalibro_processor/pull/215.diff","patch_url":"https://github.com/mezuro/kalibro_processor/pull/215.patch"},"body":"Overhaul database schema by adding indexes, foreign key constraints, cleaning up stale data, and fixing tests that relied on hardcoded/non-existing IDs.\r\n\r\nThe changes are a bit long but relatively straight-forward. I ended up changing the runner steps layout a lot because it was very hard to understand what was going on and how models were related, which proved necessary to remove the hardcoding issues.\r\n\r\nThe constraints also showed that running tests using the transaction DatabaseCleaner strategy was prone to failure - the processing jobs don't run in the same transaction as Cucumber and won't see much of the data created. Switching to the truncation strategy fixes it.\r\n\r\nI tested the data cleanup migration quite extensively, using the database dump from production at mezuro.org. It would be wise to perform a backup anyway and be ready to restore it if anything goes wrong. "},"comment":{"url":"https://api.github.com/repos/mezuro/kalibro_processor/issues/comments/233780542","html_url":"https://github.com/mezuro/kalibro_processor/pull/215#issuecomment-233780542","issue_url":"https://api.github.com/repos/mezuro/kalibro_processor/issues/215","id":233780542,"user":{"login":"rafamanzo","id":288884,"avatar_url":"https://avatars.githubusercontent.com/u/288884?v=3","gravatar_id":"","url":"https://api.github.com/users/rafamanzo","html_url":"https://github.com/rafamanzo","followers_url":"https://api.github.com/users/rafamanzo/followers","following_url":"https://api.github.com/users/rafamanzo/following{/other_user}","gists_url":"https://api.github.com/users/rafamanzo/gists{/gist_id}","starred_url":"https://api.github.com/users/rafamanzo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rafamanzo/subscriptions","organizations_url":"https://api.github.com/users/rafamanzo/orgs","repos_url":"https://api.github.com/users/rafamanzo/repos","events_url":"https://api.github.com/users/rafamanzo/events{/privacy}","received_events_url":"https://api.github.com/users/rafamanzo/received_events","type":"User","site_admin":false},"created_at":"2016-07-19T22:03:25Z","updated_at":"2016-07-19T22:03:25Z","body":"Also, giving a second look to the changes it came to me if you'd also be gentle and make the tree walking methods modifications into a separate PR as well? Sorry about the annoyance."}}
{"actor":{"display_login":"rafamanzo"}}