Re: core data migration - delete old store
Re: core data migration - delete old store
- Subject: Re: core data migration - delete old store
- From: Dave Fernandes <email@hidden>
- Date: Fri, 22 Jul 2011 00:26:27 -0400
On 2011-07-21, at 12:16 PM, Roland King wrote:
> Great - thanks for this - gets me started, I've found the documentation quite dense and soon I have to pitch in and just give it a go (I have a model I need to update in my test app and I really don't want to toss the data).
>
> I need to hunt around the NSManagedObjectModel class a bit more, clearly, there are methods there I don't know enough about. I assume there are ways to enumerate the models in the bundle, figure out which one is the 'current'
+[NSManagedObjectModel mergedModelFromBundles:]
> one and which one may match the store
+[NSManagedObjectModel mergedModelFromBundles:forStoreMetadata:]
> , will go read the class docs when they've finished d/l'ing. I saw some of the methods for making an on-the-fly migration, I'll try those out too see if they work.
>
> I think lightweight is going to do it for this change. One attribute deleted, one entity added, one mapping added, one attribute added (with a default). It's not a bad way to get my feet wet with migration actually, I can afford to bungle it up, I can save the sqlite file before I start and give it few cracks. Ok that's the weekend!
_______________________________________________
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