user523234
user523234

Reputation: 14834

Simplest way to update Entities in Data Core without losing data

I have an iOS app on App Store that utilized Data Core with SQLite engine. The updated version that I plan to update needed to add several more attributes (fields) to an entity (table). What is the simplest way to handle this without losing data on already existing SQLite database?

Upvotes: 0

Views: 544

Answers (1)

Max MacLeod
Max MacLeod

Reputation: 26672

The way to do this is with what's called a "Core Data Migration".

Here's the Core Data Model Versioning and Data Migration Programming Guide

Also, some initial posts:

Data migration with core data

core data migration

http://www.timisted.net/blog/archive/core-data-migration/

Upvotes: 2

Related Questions