{"action":"created","issue":{"url":"https://api.github.com/repos/magicalpanda/MagicalRecord/issues/708","labels_url":"https://api.github.com/repos/magicalpanda/MagicalRecord/issues/708/labels{/name}","comments_url":"https://api.github.com/repos/magicalpanda/MagicalRecord/issues/708/comments","events_url":"https://api.github.com/repos/magicalpanda/MagicalRecord/issues/708/events","html_url":"https://github.com/magicalpanda/MagicalRecord/issues/708","id":29540558,"number":708,"title":"Cannot migrate a ClassicWithBackgroundCoordinatorSQLiteMagicalRecordStack","user":{"login":"davetroy","id":11199,"avatar_url":"https://avatars.githubusercontent.com/u/11199?v=3","gravatar_id":"","url":"https://api.github.com/users/davetroy","html_url":"https://github.com/davetroy","followers_url":"https://api.github.com/users/davetroy/followers","following_url":"https://api.github.com/users/davetroy/following{/other_user}","gists_url":"https://api.github.com/users/davetroy/gists{/gist_id}","starred_url":"https://api.github.com/users/davetroy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davetroy/subscriptions","organizations_url":"https://api.github.com/users/davetroy/orgs","repos_url":"https://api.github.com/users/davetroy/repos","events_url":"https://api.github.com/users/davetroy/events{/privacy}","received_events_url":"https://api.github.com/users/davetroy/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/magicalpanda/MagicalRecord/labels/Feature+Request","name":"Feature Request","color":"009900"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/magicalpanda/MagicalRecord/milestones/6","labels_url":"https://api.github.com/repos/magicalpanda/MagicalRecord/milestones/6/labels","id":229967,"number":6,"title":"3.0.0","description":"High-level tasks left:\r\n\r\n- [x] Reconcile recent changes/PRs merged into the primary develop branch\r\n- [ ] Write tests for the data import categories, including performance tests\r\n- [ ] Documentation\r\n- [ ] Release notes\r\n- [ ] Update/create the website","creator":{"login":"tonyarnold","id":4802,"avatar_url":"https://avatars.githubusercontent.com/u/4802?v=3","gravatar_id":"","url":"https://api.github.com/users/tonyarnold","html_url":"https://github.com/tonyarnold","followers_url":"https://api.github.com/users/tonyarnold/followers","following_url":"https://api.github.com/users/tonyarnold/following{/other_user}","gists_url":"https://api.github.com/users/tonyarnold/gists{/gist_id}","starred_url":"https://api.github.com/users/tonyarnold/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tonyarnold/subscriptions","organizations_url":"https://api.github.com/users/tonyarnold/orgs","repos_url":"https://api.github.com/users/tonyarnold/repos","events_url":"https://api.github.com/users/tonyarnold/events{/privacy}","received_events_url":"https://api.github.com/users/tonyarnold/received_events","type":"User","site_admin":false},"open_issues":32,"closed_issues":33,"state":"open","created_at":"2012-12-14T11:03:06Z","updated_at":"2014-12-27T09:57:40Z","due_on":null,"closed_at":null},"comments":5,"created_at":"2014-03-17T06:56:15Z","updated_at":"2015-01-15T23:47:07Z","closed_at":null,"body":"I'm using MagicalRecord 3.0's ClassicWithBackgroundCoordinatorSQLiteMagicalRecordStack stack, which allows for the creation of two persistent store coordinators and a single physical store. It works well and I'm quite happy with it.\r\n\r\nI now need to migrate my data model. I versioned my model, but the migration is not triggered and the app crashes (unless I delete the app and reinstall fresh). The change is minor and should be a lightweight migration.\r\n\r\nPer my inquiry on StackOverflow you suggested that there is no current API for that and I should open an issue here. In the interim, is there a manual strategy that you could suggest? Thanks."},"comment":{"url":"https://api.github.com/repos/magicalpanda/MagicalRecord/issues/comments/70184944","html_url":"https://github.com/magicalpanda/MagicalRecord/issues/708#issuecomment-70184944","issue_url":"https://api.github.com/repos/magicalpanda/MagicalRecord/issues/708","id":70184944,"user":{"login":"chadbag","id":5586519,"avatar_url":"https://avatars.githubusercontent.com/u/5586519?v=3","gravatar_id":"","url":"https://api.github.com/users/chadbag","html_url":"https://github.com/chadbag","followers_url":"https://api.github.com/users/chadbag/followers","following_url":"https://api.github.com/users/chadbag/following{/other_user}","gists_url":"https://api.github.com/users/chadbag/gists{/gist_id}","starred_url":"https://api.github.com/users/chadbag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chadbag/subscriptions","organizations_url":"https://api.github.com/users/chadbag/orgs","repos_url":"https://api.github.com/users/chadbag/repos","events_url":"https://api.github.com/users/chadbag/events{/privacy}","received_events_url":"https://api.github.com/users/chadbag/received_events","type":"User","site_admin":false},"created_at":"2015-01-15T23:47:07Z","updated_at":"2015-01-15T23:47:07Z","body":"Iam not saying this is a general solution for all variations of stores/models, but for my simple case of one store and model, I was able to modify \"SQLiteMagicalRecordStack.m\"\r\n\r\n```\r\n- (NSDictionary *) defaultStoreOptions;\r\n{\r\n    NSDictionary *options = @{ MagicalRecordShouldDeletePersistentStoreOnModelMismatchKey:\r\n                                   @(self.shouldDeletePersistentStoreOnModelMismatch  };\r\n    return options;\r\n}\r\n```\r\n\r\nto\r\n\r\n```\r\n- (NSDictionary *) defaultStoreOptions;\r\n{\r\n    NSDictionary *options = @{ MagicalRecordShouldDeletePersistentStoreOnModelMismatchKey:\r\n                                   @(self.shouldDeletePersistentStoreOnModelMismatch),\r\n                            NSMigratePersistentStoresAutomaticallyOption:@YES,\r\n                            NSInferMappingModelAutomaticallyOption:@YES };\r\n    return options;\r\n}\r\n```\r\n\r\nand it seems to have done the right thing *for me*."}}