mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-11-15 21:32:10 +01:00
fix RecreateStoreOnModelMismatch option not working when an existing xcdatamodel gets updated without adding a new version
This commit is contained in:
1 parent
4a34012d58
commit
f99d3cc21a
9 files changed
+36
-12
No files matched your search
@@ -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