Closed jyaunches closed 8 years ago
Thanks for your PR. I want to discuss with @michaelarmstrong before merge it.
I think that deleting the store is not the best solution. I don't like the idea to lost all the data, maybe it would be better to rename the old one.
Hey,
Perhaps it's something that can be configurable, so users have a choice. I personally use an in memory store for development but I see how this can be useful too.
SuperRecord.deleteStoreForIncompatibleModel = true
or something?
Sent from my iPhone
On 16 Jun 2016, at 09:52, Piergiuseppe Longo notifications@github.com wrote:
Thanks for your PR. I want to discuss with @michaelarmstrong before merge it.
I think that deleting the store is not the best solution. I don't like the idea to lost all the data, maybe it would be better to rename the old one.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
@jyaunches and @michaelarmstrong do you think that this feature would be useful for development or also in production?
I think that it's too dangerous deleting the data. Imagine this scenario:
I prefer to have a crash (with a log, like Fabric) and fix it in 1.3 instead of an angry user who has lost is entire data.
If we are discussing only about development we could use a debug flag.
#if SUPER_RECORD_DEBUG
deleteStore()
#else
//CRASH
#endif
So one of the things I liked about magical record is that it if your store changes.. instead of crashing on app launch (and loading of the persistent store from file system).. it attempts to just delete the existing store and create a new one.
This is useful while your app is in development because currently if you're pushing out builds every day or couple of days to your team of internal test users, you have 3 options for handling database changes.
With this implementation.. you can just tell them that they may lose data between installs.
Discussion areas: