silvaric
silvaric

Reputation: 1708

Transitioning old Datamodel to completely new one (start from scratch and delete everything else)

I have one xcdatamodel in the project, with 12 versions and I want to refactoring the model. Like create new one from scratch.

The new model will be very different and I don't want to keep the old entities, managedObjects, etc.... just empty everything, like start from new project, with a clean data model.

Also I have already apps in store so I need to be careful in the next update.

Questions:

With your experience how the best way?

Thanks a lot, I already search but I can't have the right answer for this specific case.

Upvotes: 0

Views: 68

Answers (1)

Mundi
Mundi

Reputation: 80265

Answers:

  • Yes, you can simply delete the data store. (Check if it exists with NSFileManager.)
  • Yes, you can simply use another data model.
  • No, refactoring an old data model sounds like pain without any tangible benefits.

As mentioned in the comment by Mike, the only concern is if this is really the desired behavior for your users.

Upvotes: 2

Related Questions