title: Core Data Migration custom migration
body: <p>I'm trying to do a custom migration, following the instructions found <a href="https://stackoverflow.com/questions/40647764/swift-coredata-migration-set-new-attribute-value-according-to-old-attribute">here</a>, changing an attribute name and type but it doesn't seem to be running the mapping.</p>
  
  <p>Old model has an attribute names "roundDrill" which is a Boolean. The new model has this removed and a new attribute called "drillType" which is a String.</p>
  
  <p>I have a mapping model called "V2V3.xcmappingmodel" where the entity has a custom policy set "Diamond_Painting_Logbok.V2V3". The new attribute has a value of "FUNCTION($entityPolicy, "roundToType:" , $source.roundDrill)"</p>
  
  <p>In the "V2V3.swift" I have the below code</p>
  
  <pre><code>import UIKit
  import CoreData
  
  class V2V3: NSEntityMigrationPolicy {
      func roundToType(isRound:NSNumber) -&gt; String {
          NSLog("Round: \(isRound)")
          if isRound.boolValue {
              return "Round"
          } else {
              return "Square"
          }
      }
  }
  </code></pre>
  
  <p>When I print out the value of drillType, I'm getting nil.
  The NSLog on the function isn't being printed at all. If I change the custom policy name, its not giving me an error so appears as though its being ignored completely</p>