From 2c7039232eeb1548951d1672ba441646c3a1808b Mon Sep 17 00:00:00 2001 From: John Rommel Estropia Date: Wed, 15 Nov 2017 23:50:10 +0900 Subject: [PATCH] merge sqlite journal files before migration --- Sources/DataStack+Migration.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/Sources/DataStack+Migration.swift b/Sources/DataStack+Migration.swift index 292bdb1..f723670 100644 --- a/Sources/DataStack+Migration.swift +++ b/Sources/DataStack+Migration.swift @@ -714,6 +714,7 @@ public extension DataStack { } timerQueue.async(execute: recursiveCheck) + _ = try storage.cs_finalizeStorageAndWait(soureModelHint: sourceModel) _ = try withExtendedLifetime(NSPersistentStoreCoordinator(managedObjectModel: destinationModel)) { (coordinator: NSPersistentStoreCoordinator) in try coordinator.addPersistentStoreSynchronously(