title: Trying to update my DBModel with lightweight migration but nothing happens
body: <p>So the categories from my db model got updated ( before there was like 4 now they are 7) and I want to update the core data as well with the new objects. </p>
  
  <p>I tried to apply this : <a href="https://developer.apple.com/documentation/coredata/using_lightweight_migration" rel="nofollow noreferrer">https://developer.apple.com/documentation/coredata/using_lightweight_migration</a>  </p>
  
  <pre><code>    lazy var persistentStoreCoordinator: NSPersistentStoreCoordinator = {
      // The persistent store coordinator for the application. This implementation creates and returns a coordinator, having added the store for the application to it. This property is optional since there are legitimate error conditions that could cause the creation of the store to fail.
      // Create the coordinator and store
      let coordinator = NSPersistentStoreCoordinator(managedObjectModel: self.managedObjectModel)
      let url = self.applicationDocumentsDirectory.appendingPathComponent("x.sqlite")
      let options = [NSMigratePersistentStoresAutomaticallyOption: true, NSInferMappingModelAutomaticallyOption: true]
      var failureReason = "There was an error creating or loading the application's saved data."
      do {
          try coordinator.addPersistentStore(ofType: NSSQLiteStoreType, configurationName: nil, at: url, options: options)
      } catch {
          // Report any error we got.}
  </code></pre>
  
  <p>But my data is the same...it s not updating with the new categories.
  Any help ? Thanks.. 
  PS: Should I make a new model and map the old one in the new one?<a href="https://i.stack.imgur.com/r2wig.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/r2wig.png" alt="enter image description here"></a></p>