• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Core Data Lightweight Migration Woes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Core Data Lightweight Migration Woes


  • Subject: Re: Core Data Lightweight Migration Woes
  • From: Steve Steinitz <email@hidden>
  • Date: Fri, 20 Aug 2010 16:21:49 +1000

Hi Brad,

After much struggle and even writing a nightmare migrator app, I discovered one day that the lightweight migration really does work.

In broad brush strokes here's what I did:

- Removed all the complicated migration support code that had never worked...

- ...except the code that ensured that the options dictionary which is passed to addPersistentStoreWithType included these two options:
NSMigratePersistentStoresAutomaticallyOption
NSInferMappingModelAutomaticallyOption


- Made sure the old and new models were both in the xcdatamodeld package and that the new one was the 'Current' one (litte green dot on the icon).

- Removed any stray mopping models, just in case

- Cleaned (important, I think) and launched the application

- Watched with delight (and woke my family) when it created a new database and archived the old one.

But you probably know all that already.

Cheers,

Steve

_______________________________________________

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


  • Follow-Ups:
    • Re: Core Data Lightweight Migration Woes
      • From: Jack Nutting <email@hidden>
  • Prev by Date: Re: 64KB limit in passed in text for a service using NSTask
  • Next by Date: Re: Core Data Lightweight Migration Woes
  • Previous by thread: Re: Core Data Lightweight Migration Woes
  • Next by thread: Re: Core Data Lightweight Migration Woes
  • Index(es):
    • Date
    • Thread