I'd like to use CoreData lightweight migration as much as possible, but could not find in the documentation, which exactly are the cases when this is possible. The documentation says: If you just make simple changes to your model (such as adding a new attribute to an entity), on Mac OS X v10.6 and later and on iPhone OS, Core Data can perform automatic data migration.
For Core Data to be able to do this, the changes must fit an obvious migration pattern, for example:
- Simple addition of a new attribute
- A non-optional attribute becoming optional
- An optional attribute becoming non-optional, and defining a default value
Well, I tried out also adding a new entity without relationships and deleting an existing entity (without relationships) and that worked for me automatically as well.
The question is: does anybody know what exactly are the simple changes which can be migrated automatically?
From WWDC 2010 Session 118 Mastering Core Data*:
Inferable Changes supported by lightweight migration
*Video requires Apple Developer login
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With