{"action":"created","issue":{"url":"https://api.github.com/repos/cfpb/regulations-core/issues/62","labels_url":"https://api.github.com/repos/cfpb/regulations-core/issues/62/labels{/name}","comments_url":"https://api.github.com/repos/cfpb/regulations-core/issues/62/comments","events_url":"https://api.github.com/repos/cfpb/regulations-core/issues/62/events","html_url":"https://github.com/cfpb/regulations-core/pull/62","id":121287343,"number":62,"title":"Store notices separately for each applicable regulation","user":{"login":"willbarton","id":10562538,"avatar_url":"https://avatars.githubusercontent.com/u/10562538?v=3","gravatar_id":"","url":"https://api.github.com/users/willbarton","html_url":"https://github.com/willbarton","followers_url":"https://api.github.com/users/willbarton/followers","following_url":"https://api.github.com/users/willbarton/following{/other_user}","gists_url":"https://api.github.com/users/willbarton/gists{/gist_id}","starred_url":"https://api.github.com/users/willbarton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/willbarton/subscriptions","organizations_url":"https://api.github.com/users/willbarton/orgs","repos_url":"https://api.github.com/users/willbarton/repos","events_url":"https://api.github.com/users/willbarton/events{/privacy}","received_events_url":"https://api.github.com/users/willbarton/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-12-09T16:38:24Z","updated_at":"2015-12-18T19:20:59Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/cfpb/regulations-core/pulls/62","html_url":"https://github.com/cfpb/regulations-core/pull/62","diff_url":"https://github.com/cfpb/regulations-core/pull/62.diff","patch_url":"https://github.com/cfpb/regulations-core/pull/62.patch"},"body":"This PR modifies the way regulations-core stores notices. \r\n\r\nUp to now notices have been parsed and stored as a whole, with all the notice content that applies to any regulation. This changes stores notices on a per-regulation basis. This is best exemplified through URLs, I think. \r\n\r\nAll other content stored in regulations-core is stored per-regulation, i.e. `regulation/[PART NUMBER]/[DOCUMENT NUMBER]`. Notices, previously, were stored `notice/[DOCUMENT_NUMBER]`. This is fine if the notice includes content for all the applicable regulations, but it won't work if the notice does not. With [RegML](https://github.com/cfpb/regulations-schema), that won't be the case. \r\n\r\nTo do this, this PR removes the separate `NoticeCFRPart` model, because there will no longer be a one-to-many relationship between notices and regulations. Instead there will be a `Notice` instance for each regulation a particular document number applies to. There are appropriate migrations to make this happen and migrate existing data (backwards migrations are included). \r\n\r\n*THIS IS A BREAKING CHANGE*\r\n\r\n![atomicbomb](https://cloud.githubusercontent.com/assets/10562538/11691356/9d01b8a6-9e68-11e5-9da0-7ad5c9e58a70.gif)\r\n\r\nThis is accompanied by PRs for cfpb/regulations-parser#305, cfpb/regulations-site#762, and cfpb/regulations-stub#23.\r\n"},"comment":{"url":"https://api.github.com/repos/cfpb/regulations-core/issues/comments/165875567","html_url":"https://github.com/cfpb/regulations-core/pull/62#issuecomment-165875567","issue_url":"https://api.github.com/repos/cfpb/regulations-core/issues/62","id":165875567,"user":{"login":"grapesmoker","id":1723233,"avatar_url":"https://avatars.githubusercontent.com/u/1723233?v=3","gravatar_id":"","url":"https://api.github.com/users/grapesmoker","html_url":"https://github.com/grapesmoker","followers_url":"https://api.github.com/users/grapesmoker/followers","following_url":"https://api.github.com/users/grapesmoker/following{/other_user}","gists_url":"https://api.github.com/users/grapesmoker/gists{/gist_id}","starred_url":"https://api.github.com/users/grapesmoker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grapesmoker/subscriptions","organizations_url":"https://api.github.com/users/grapesmoker/orgs","repos_url":"https://api.github.com/users/grapesmoker/repos","events_url":"https://api.github.com/users/grapesmoker/events{/privacy}","received_events_url":"https://api.github.com/users/grapesmoker/received_events","type":"User","site_admin":false},"created_at":"2015-12-18T19:20:59Z","updated_at":"2015-12-18T19:20:59Z","body":"NEVER TELL ME THE ODDS\r\n\r\nALL SYSTEMS ARE GO I REPEAT ALL SYSTEMS ARE GO"}}