Adding a new entity to coredata - can I still use lightweight migration?

Viewed 3724

I have an existing core data set and I want to add an entity to it. I'm a little confused over whether I can use lightweight migration after adding a new entity to transition existing users to the new model.

The current modal is (just showing entities):

Story 1toMany-> Sentences

I need:

Story 1toMany-> Sentences 1toMany-> Media

Can I use the lightweight migration tool to do this?

I've read in the documentation:

For Core Data to be able to generate an inferred mapping model, changes must fit an obvious migration pattern, for example:

Simple addition of a new attribute Removal of an attribute A non-optional attribute becoming optional An optional attribute becoming non-optional, and defining a default value Renaming an entity or property

But this question seems to suggest lightweight migration will still work with the addition of an entity. Since the new media entity is optional I can't see how it would practically be a problem.

2 Answers
Related