Skip to content

Commit dc46dbe

Browse files
committed
Do not allow migration for read-only config
Right?
1 parent cf66bfa commit dc46dbe

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Sources/ManagedModels/Container/NSPersistentStoreDescription+Data.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ extension NSPersistentStoreDescription {
2424

2525
// TBD: options, timeout, sqlitePragmas
2626

27+
if !modelConfiguration.allowsSave {
28+
shouldMigrateStoreAutomatically = false
29+
}
30+
2731
shouldAddStoreAsynchronously = false
2832
// shouldMigrateStoreAutomatically
2933
// shouldInferMappingModelAutomatically

0 commit comments

Comments
 (0)