Programmatic Core Data Migration
Programmatic Core Data Migration
- Subject: Programmatic Core Data Migration
- From: tshanno <email@hidden>
- Date: Mon, 25 Feb 2013 07:27:03 -0600
I'm at an early stage of developing my application and up to this point whenever I've made a changes to the core data model, I've simply trashed the old one and reimported default data. However I'm now at a point where I'd like to begin using the thing and, as a result, I want to keep the old data and use core data versioning and migration. I can't imagine that lightweight migration won't be fine for whatever changes I make from here on out.
Many will think it foolish, I suppose, but I generated my object model completely programmatically. That is, I didn't use interface builder. Unfortunately, as far as I can tell, the information and instructions in the Core Data Model Versioning and Data Migration Programming Guide seem to assume that you did use interface builder and, therefore, suggest you create a new version of the model using Editor -> Add Model Version. I could do this but, of course, I'd simply have two blank graphs. :)
So it isn't entirely clear to me what I should do here. Should I simply simply alter the version I have in my code, add the necessary options for lightweight migration? Xcode will therefore have the new version in code and the old version indirectly in the form of the old persistent store. Is that all it needs?
Thanks for any help here.
Tom S.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden