This code deletes the store when it finds a mismatched store/model. Configurable in MagicalRecord+options
Added automatic store deletion if the store does not match the model
Missed the configuration
On by default (Set in initialize). I can't think of any situation in which I'd want to NOT delete the store on a model mismatch .
can you post a short 1-2 sentence blurb in the read me also?
The alternative is your app loads completely blank in production. I think I'd rather it function...
That said, I've written mostly consumption oriented apps so far, nothing where the user has put in hours of work creating data. I could see that being the wrong choice for some apps.
My take is that Magical Record aims to be simple and "just work" wherever possible, and having it recover from the developer adding a field and forgetting to version seems to fit that ideal. I'm not married to it though.
Updating readme with a short blurb
Ad-Hoc builds use release configuration by default (no debug flag). In that case, beta users will still need to uninstall/re-install with every model change (or the developer will have to create a ton of model versions).
The other option is having the user just set the option themselves for ad-hoc builds. Not horrible I guess.
Cleanup code is now debug-only
Clarified the DEBUG only nature of the fix