Replace core data model without migration

半世苍凉 提交于 2020-01-12 03:42:26

问题


I have changed my core data model quite extensively. There are loads of question how to migrate the old data into the new model, however i don't need to migrate anything.

I just would like to replace the current Core Data instance. How can this be done?


回答1:


I'm going to assume you're using a persistant store coordinator with NSSQLiteStoreType. Just change the name of the url for your persistant store coordinator. If the previous version used a url called MyApp.sqlite, change it to MyAppVersionX.sqlite.



来源:https://stackoverflow.com/questions/9103045/replace-core-data-model-without-migration

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!