nanochrome
nanochrome

Reputation: 727

Updating a Current CoreData Store

How would you update a CoreData store with a new/updated data model?

Upvotes: 0

Views: 256

Answers (1)

gerry3
gerry3

Reputation: 21460

Use a data migration:

During migration, Core Data creates two stacks, one for the source store and one for the destination store. Core Data then fetches objects from the source stack and inserts the appropriate corresponding objects into the destination stack. Note that Core Data must re-create objects in the new stack.

Upvotes: 2

Related Questions