mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-03-17 23:13:52 +01:00
fix RecreateStoreOnModelMismatch option not working when an existing xcdatamodel gets updated without adding a new version
This commit is contained in:
@@ -223,7 +223,7 @@ public extension DataStack {
|
||||
|
||||
do {
|
||||
|
||||
try _ = self.model[metadata].flatMap(storage.eraseStorageAndWait)
|
||||
_ = try storage.eraseStorageAndWait(soureModel: self.model[metadata])
|
||||
try self.addStorageAndWait(storage)
|
||||
|
||||
GCDQueue.Main.async {
|
||||
@@ -388,7 +388,7 @@ public extension DataStack {
|
||||
URL: cacheFileURL,
|
||||
options: storeOptions
|
||||
)
|
||||
try _ = self.model[metadata].flatMap(storage.eraseStorageAndWait)
|
||||
_ = try storage.eraseStorageAndWait(soureModel: self.model[metadata])
|
||||
|
||||
try self.createPersistentStoreFromStorage(
|
||||
storage,
|
||||
|
||||
Reference in New Issue
Block a user