{"action":"created","issue":{"url":"https://api.github.com/repos/realm/realm-cocoa/issues/3277","repository_url":"https://api.github.com/repos/realm/realm-cocoa","labels_url":"https://api.github.com/repos/realm/realm-cocoa/issues/3277/labels{/name}","comments_url":"https://api.github.com/repos/realm/realm-cocoa/issues/3277/comments","events_url":"https://api.github.com/repos/realm/realm-cocoa/issues/3277/events","html_url":"https://github.com/realm/realm-cocoa/issues/3277","id":137377897,"number":3277,"title":"Migrations with extra realms just don't work","user":{"login":"daniel-beard","id":2645146,"avatar_url":"https://avatars.githubusercontent.com/u/2645146?v=3","gravatar_id":"","url":"https://api.github.com/users/daniel-beard","html_url":"https://github.com/daniel-beard","followers_url":"https://api.github.com/users/daniel-beard/followers","following_url":"https://api.github.com/users/daniel-beard/following{/other_user}","gists_url":"https://api.github.com/users/daniel-beard/gists{/gist_id}","starred_url":"https://api.github.com/users/daniel-beard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daniel-beard/subscriptions","organizations_url":"https://api.github.com/users/daniel-beard/orgs","repos_url":"https://api.github.com/users/daniel-beard/repos","events_url":"https://api.github.com/users/daniel-beard/events{/privacy}","received_events_url":"https://api.github.com/users/daniel-beard/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-02-29T21:14:06Z","updated_at":"2016-03-02T18:11:25Z","closed_at":null,"body":"## Goals\r\n\r\n> Migrate a Realm to add a new NSString property.\r\n\r\n## Expected Results\r\n\r\n> Migration should work\r\n\r\n\r\n## Actual Results\r\n\r\n> Migration doesn't take place, and instead raises an exception.\r\n> Took into account https://github.com/realm/realm-cocoa/issues/1793 and added a default value to the new property, still does not migrate correctly.\r\n\r\n```\r\nRealmTest[23823:2981894] *** Terminating app due to uncaught exception 'RLMException', reason: 'Migration is required due to the following errors: \r\n- Property 'test' has been added to latest object model.'\r\n*** First throw call stack:\r\n(\r\n\t0   CoreFoundation                      0x0000000107323e65 __exceptionPreprocess + 165\r\n\t1   libobjc.A.dylib                     0x0000000106d9cdeb objc_exception_throw + 48\r\n\t2   RealmTest                           0x0000000106380d79 _Z18RLMSetErrorOrThrowP7NSErrorPU15__autoreleasingS0_ + 985\r\n\t3   RealmTest                           0x000000010635805a +[RLMRealm realmWithConfiguration:error:] + 7306\r\n\t4   RealmTest                           0x00000001061a8c8e __41+[DBRealmMigrationHelper migrateIfNeeded]_block_invoke + 558\r\n\t5   libdispatch.dylib                   0x0000000108d1749b _dispatch_client_callout + 8\r\n\t6   libdispatch.dylib                   0x0000000108d02e28 dispatch_once_f + 543\r\n\t7   RealmTest                           0x00000001061a8a47 +[DBRealmMigrationHelper migrateIfNeeded] + 87\r\n\t8   RealmTest                           0x00000001061a994c -[AppDelegate application:didFinishLaunchingWithOptions:] + 92\r\n\t9   UIKit                               0x00000001076c71f1 -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 272\r\n\t10  UIKit                               0x00000001076c8397 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 3415\r\n\t11  UIKit                               0x00000001076cecc6 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1760\r\n\t12  UIKit                               0x00000001076cbe7b -[UIApplication workspaceDidEndTransaction:] + 188\r\n\t13  FrontBoardServices                  0x0000000109ff8754 -[FBSSerialQueue _performNext] + 192\r\n\t14  FrontBoardServices                  0x0000000109ff8ac2 -[FBSSerialQueue _performNextFromRunLoopSource] + 45\r\n\t15  CoreFoundation                      0x000000010724fa31 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17\r\n\t16  CoreFoundation                      0x000000010724595c __CFRunLoopDoSources0 + 556\r\n\t17  CoreFoundation                      0x0000000107244e13 __CFRunLoopRun + 867\r\n\t18  CoreFoundation                      0x0000000107244828 CFRunLoopRunSpecific + 488\r\n\t19  UIKit                               0x00000001076cb7cd -[UIApplication _run] + 402\r\n\t20  UIKit                               0x00000001076d0610 UIApplicationMain + 171\r\n\t21  RealmTest                           0x00000001061aad6f main + 111\r\n\t22  libdyld.dylib                       0x0000000108d4b92d start + 1\r\n\t23  ???                                 0x0000000000000001 0x0 + 1\r\n)\r\nlibc++abi.dylib: terminating with uncaught exception of type NSException\r\n```\r\n\r\n## Steps to Reproduce\r\n\r\n> Clone https://github.com/daniel-beard/RealmTest\r\n> Checkout dbeard_branch1, build and run with a fresh simulator\r\n> Checkout dbeard_branch2, build and run\r\n\r\n## Code Sample\r\n\r\n> See above.\r\n\r\n## Version of Realm and Tooling\r\n\r\n> Realm (Obj-C 0.98.3, Xcode 7.2.1)"},"comment":{"url":"https://api.github.com/repos/realm/realm-cocoa/issues/comments/191355124","html_url":"https://github.com/realm/realm-cocoa/issues/3277#issuecomment-191355124","issue_url":"https://api.github.com/repos/realm/realm-cocoa/issues/3277","id":191355124,"user":{"login":"daniel-beard","id":2645146,"avatar_url":"https://avatars.githubusercontent.com/u/2645146?v=3","gravatar_id":"","url":"https://api.github.com/users/daniel-beard","html_url":"https://github.com/daniel-beard","followers_url":"https://api.github.com/users/daniel-beard/followers","following_url":"https://api.github.com/users/daniel-beard/following{/other_user}","gists_url":"https://api.github.com/users/daniel-beard/gists{/gist_id}","starred_url":"https://api.github.com/users/daniel-beard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daniel-beard/subscriptions","organizations_url":"https://api.github.com/users/daniel-beard/orgs","repos_url":"https://api.github.com/users/daniel-beard/repos","events_url":"https://api.github.com/users/daniel-beard/events{/privacy}","received_events_url":"https://api.github.com/users/daniel-beard/received_events","type":"User","site_admin":false},"created_at":"2016-03-02T18:11:25Z","updated_at":"2016-03-02T18:11:25Z","body":"Ignore printing out the errors for now, as I don't pass those in intentionally, to show the exception rather than the errors."}}