Skip to content

Commit

Permalink
Set auto migration to false
Browse files Browse the repository at this point in the history
  • Loading branch information
mssun committed Feb 8, 2025
1 parent a69c4d1 commit b04d4c6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions passKit/Controllers/CoreDataStack.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ public class PersistenceController {

init(isUnitTest: Bool = false) {
self.container = NSPersistentContainer(name: Self.modelName, managedObjectModel: .sharedModel)

let description = container.persistentStoreDescriptions.first
description?.shouldMigrateStoreAutomatically = false
description?.shouldInferMappingModelAutomatically = false
if isUnitTest {
let description = NSPersistentStoreDescription()
description.url = URL(fileURLWithPath: "/dev/null")
container.persistentStoreDescriptions = [description]
description?.url = URL(fileURLWithPath: "/dev/null")
}
}

Expand Down

0 comments on commit b04d4c6

Please sign in to comment.