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 protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to