I have an app on the store, with populated data in a CoreData base. For pre-populating the database, we generated a .sqlite file with the application data.
For example in the table PERSON, I have
134 Martin Developer
256 John Boss
371 Doe Somebody
In the new version of my app, the PERSON table looks like
134 Martin Developer
256 John Boss
399 Mister Someoneelse
So I replaced the 371 line by the 399 one.
It works fine, except when I install the new app over the old one. In this case, data don’t change at all. I looks like a migration problem, but the database structure is exactly the same. Only rows have changed.
Is it a migration problem ?
When you have a prepopulated database, you typically copy it to the application document directory the first time it is run on a device. Presumably, you want to save user data in the database as well and the sqlite store has to be in the application document directory to be writable.
So, if you did not do the copying – implement this first.
Then (assuming you did not change your data model), to do the change in your question,