Add Core Data Index to certain Attributes via migration
- by steipete
For performance reasons, i want to set the Indexed Attribute to some of my entities. I created a new core data model version to perform the changes. Core Data detects the changes and migrates my model to the new version, however, NO INDEXES ARE GENERATED.
If I recreate the database from scratch, the indexes are there.
I checked with SQLite Browser both on the iPhone and on the Simulator.
The problem only occurs if a database in the prior format is already there.
Is there a way to manually add the indexes? Write some sql for that? Or am I missing something? I did already some more critical migrations, no problems there. But those missing indexes are bugging me.
Thanks for helping!