da32
da32

Reputation: 743

Modify CoreData twice during development

I've gt a question to ask. Currently my production CoreData version is 1.0. Then , since i've gt a new class/property to add, i've increased version to 1.1 and released this version for tester.

Now, I need to add another property to CoreData.

1) So, should I create a new model version or I can straight away modify current CoreData(v1.1).

Note that the build with v1.1 CoreData hasn't been released to production yet..just to tester.

2) If need to add new version (v1.2) to accommodate the new property, will it have any affect when i released it to production build?

3) If can straight away modify, will current development version that tester has installed crash when they update to new version that has the new property added?

Upvotes: 0

Views: 39

Answers (2)

asmi85
asmi85

Reputation: 61

  1. You can modify v1.1, but then tester will have to delete the app, as the app may not be able to open the coredata or have inconsistencies. To avoid this, tester will have to delete the app,and he might miss issues(if any) due to this structure change, to catch only in production. So you should be changing the version.
  2. It wont cause any issues, if the versioning and migration is done properly.
  3. Yes, there could be inconsistencies and instances where the app won't be able to open the coredata.

Upvotes: 1

Muhammad Zeeshan
Muhammad Zeeshan

Reputation: 2451

In order to avoid CoreData versioning for testing purpose you can modify the current CoreData version and tell your tester to delete the previous build before installing new one.

Otherwise you have to perform migration every time you change the DB schema in order to avoid inconsistency.

You can do the versioning before sending it to the production environment.

Upvotes: 0

Related Questions