mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-03-24 18:31:41 +01:00
add internal utilities to force checkpoint operations on SQLite
This commit is contained in:
@@ -707,6 +707,7 @@ public extension DataStack {
|
|||||||
|
|
||||||
do {
|
do {
|
||||||
|
|
||||||
|
try storage.cs_finalizeStorageAndWait(soureModelHint: sourceModel)
|
||||||
try migrationManager.migrateStore(
|
try migrationManager.migrateStore(
|
||||||
from: fileURL,
|
from: fileURL,
|
||||||
sourceType: type(of: storage).storeType,
|
sourceType: type(of: storage).storeType,
|
||||||
@@ -716,6 +717,13 @@ public extension DataStack {
|
|||||||
destinationType: type(of: storage).storeType,
|
destinationType: type(of: storage).storeType,
|
||||||
destinationOptions: nil
|
destinationOptions: nil
|
||||||
)
|
)
|
||||||
|
let temporaryStorage = SQLiteStore(
|
||||||
|
fileURL: temporaryFileURL,
|
||||||
|
configuration: storage.configuration,
|
||||||
|
migrationMappingProviders: storage.migrationMappingProviders,
|
||||||
|
localStorageOptions: storage.localStorageOptions
|
||||||
|
)
|
||||||
|
try temporaryStorage.cs_finalizeStorageAndWait(soureModelHint: destinationModel)
|
||||||
}
|
}
|
||||||
catch {
|
catch {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user