Every time I bump to a new version of my Core Data Model, the SQLite database doesn't get filled with the previous versions data.
For example:
- I have a users table.
- I click Editor > Add Model Version and change the model version to 7
- I add a field like "name" to the users table.
- In my app delegate, I'm using MagicalRecord to manage my database, and update the code to
[MagicalRecord setupCoreDataStackWithAutoMigratingSqliteStoreNamed:@"myapp 7"]; - I run the app in the simulator, and now whatever was in my users table, is completely gone.
However, if I move back to "myapp 6", the users are all there still.
Is there a way to bump the model version and keep the data from SQLite?
Thanks
Aucun commentaire:
Enregistrer un commentaire