magicalpanda / MagicalRecord

Super Awesome Easy Fetching for Core Data!
Other
10.8k stars 1.79k forks source link

Force datastore recreation is model version doesn't match in production #776

Open sarbogast opened 10 years ago

sarbogast commented 10 years ago

I'm using CoreData solely to store some cached data, so it's not a big deal if the store is recreated every now and then. I've read that:

When using the default sqlite data store with the DEBUG flag set, if you change your model without creating a new model version, Magical Record will delete the old store and create a new one automatically.

Is there anyway that I can force this behavior in production as well, without the DEBUG flag set?

sarbogast commented 10 years ago

Any news on that?

casademora commented 10 years ago

In the MR3 branch, there is a property on the MagicalRecordStack object (used to manage the contents of the stack, and for vending new contexts) called deleteStoreOnModelMismatch. Set that to true. This is the same thing you’d do on the previous versions of magicalRecord…

On Jun 13, 2014, at 2:19 AM, Sebastien Arbogast notifications@github.com wrote:

Any news on that?

— Reply to this email directly or view it on GitHub.