Originally created by @plamenterziev on GitHub (Jan 21, 2016).
I am using addSQLiteStoreAndWait to setup my data stack. My model is very simple and the objects are with limited count (only 22) so any migration will work fast. However the current API I cannot perform lightweight migration and have to use the asynchronous addSQLiteStore method which will make my code more complex than needed.
An option to perform lightweight data migration even using the addSQLiteStoreAndWait method will be useful.
Originally created by @plamenterziev on GitHub (Jan 21, 2016).
I am using addSQLiteStoreAndWait to setup my data stack. My model is very simple and the objects are with limited count (only 22) so any migration will work fast. However the current API I cannot perform lightweight migration and have to use the asynchronous addSQLiteStore method which will make my code more complex than needed.
An option to perform lightweight data migration even using the addSQLiteStoreAndWait method will be useful.
adam
added the wontfix label 2025-12-29 18:21:42 +01:00
@plamenterziev Thanks for the feedback!
I understand the convenience of having a synchronous migration method, but I find little merit to writing a separate API for it for several reasons:
No matter how small your data store is, CoreStore still implements incremental migrations. Multiple synchronous migrations run consecutive to each other will be very prone to deadlocks.
In my opinion, the benefits of rewriting an app's launch code to support asynchronous startup far outweighs the cost of maintaining a synchronous API that is not very safe to begin with.
I believe there are far more apps that need the asynchronous version, and I don't want to encourage use of the synchronous API.
Sorry, I don't think there's enough good reasons to support this. I suggest you give your app a startup screen and then switch to your main view controller once addSQLiteStore's completion runs.
@JohnEstropia commented on GitHub (Jan 21, 2016):
@plamenterziev Thanks for the feedback!
I understand the convenience of having a synchronous migration method, but I find little merit to writing a separate API for it for several reasons:
1. No matter how small your data store is, CoreStore still implements incremental migrations. Multiple synchronous migrations run consecutive to each other will be very prone to deadlocks.
2. In my opinion, the benefits of rewriting an app's launch code to support asynchronous startup far outweighs the cost of maintaining a synchronous API that is not very safe to begin with.
3. I believe there are far more apps that need the asynchronous version, and I don't want to encourage use of the synchronous API.
Sorry, I don't think there's enough good reasons to support this. I suggest you give your app a startup screen and then switch to your main view controller once addSQLiteStore's completion runs.
@plamenterziev commented on GitHub (Jan 22, 2016):
Hi @JohnEstropia
I understand your point, so what about the following:
Just allow user to be able to supply options when opening the persistent store, i.e. to provide custom options in optionsForSQLiteStore() dictionary?
@plamenterziev commented on GitHub (Jan 22, 2016):
Hi @JohnEstropia
I understand your point, so what about the following:
Just allow user to be able to supply options when opening the persistent store, i.e. to provide custom options in optionsForSQLiteStore() dictionary?
I'm sorry but I'm not fond of supporting API's that I won't encourage using. Adding a synchronous method that provide the option for migration provides more risk than the simplicity it provides.
Of course you are free to fork CoreStore and implement your method :)
@JohnEstropia commented on GitHub (Jan 26, 2016):
@plamenterziev
Hi, sorry for the late reply.
I'm sorry but I'm not fond of supporting API's that I won't encourage using. Adding a synchronous method that provide the option for migration provides more risk than the simplicity it provides.
Of course you are free to fork CoreStore and implement your method :)
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @plamenterziev on GitHub (Jan 21, 2016).
I am using addSQLiteStoreAndWait to setup my data stack. My model is very simple and the objects are with limited count (only 22) so any migration will work fast. However the current API I cannot perform lightweight migration and have to use the asynchronous addSQLiteStore method which will make my code more complex than needed.
An option to perform lightweight data migration even using the addSQLiteStoreAndWait method will be useful.
@JohnEstropia commented on GitHub (Jan 21, 2016):
@plamenterziev Thanks for the feedback!
I understand the convenience of having a synchronous migration method, but I find little merit to writing a separate API for it for several reasons:
Sorry, I don't think there's enough good reasons to support this. I suggest you give your app a startup screen and then switch to your main view controller once addSQLiteStore's completion runs.
@plamenterziev commented on GitHub (Jan 22, 2016):
Hi @JohnEstropia
I understand your point, so what about the following:
Just allow user to be able to supply options when opening the persistent store, i.e. to provide custom options in optionsForSQLiteStore() dictionary?
@JohnEstropia commented on GitHub (Jan 26, 2016):
@plamenterziev
Hi, sorry for the late reply.
I'm sorry but I'm not fond of supporting API's that I won't encourage using. Adding a synchronous method that provide the option for migration provides more risk than the simplicity it provides.
Of course you are free to fork CoreStore and implement your method :)