<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: -",
    "macOS: 14.0.0 -",
    "swift: 5.8.0 -",
    "tvOS: 17.0.0 -",
    "visionOS: -",
    "watchOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreData",
  "identifier" : "/documentation/CoreData/NSCustomMigrationStage/init(migratingFrom:to:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Core Data",
      "CoreData"
    ],
    "preciseIdentifier" : "s:So22NSCustomMigrationStageC8CoreDataE13migratingFrom2toABSo29NSManagedObjectModelReferenceC_AGtcfc"
  },
  "title" : "init(migratingFrom:to:)"
}
-->

# init(migratingFrom:to:)

Creates a custom migration stage with the specified source and destination model references.

```
convenience init(migratingFrom currentModel: NSManagedObjectModelReference, to nextModel: NSManagedObjectModelReference)
```

## Parameters

`currentModel`

The reference that represents the migration’s source model.

`nextModel`

The reference that represents the migration’s destination model.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)