1. 关于数据模型
2. 迁移
// 在设置持久化存储助手的时候进行一些修改 if (![_persistentStoreCoordinator addPersistentStoreWithType:NSSQLiteStoreType configuration:nil URL:storeURL options:nil error:&error]){} // 替换为 NSDictionary *options = @{NSMigratePersistentStoresAutomaticallyOption:@YES,NSInferMappingModelAutomaticallyOption:@YES}; if (![_persistentStoreCoordinator addPersistentStoreWithType:NSSQLiteStoreType configuration:nil URL:storeURL options:options error:&error]){}
Core Data 迁移与版本管理,布布扣,bubuko.com
原文:http://www.cnblogs.com/chemandy/p/3590985.html