<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: 17.0.0 -",
    "macOS: 14.0.0 -",
    "swift: 5.9.0 -",
    "tvOS: 17.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftData",
  "identifier" : "/documentation/SwiftData/ModelContainer/migrationPlan",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "SwiftData"
    ],
    "preciseIdentifier" : "s:9SwiftData14ModelContainerC13migrationPlanAA015SchemaMigrationF0_pXpSgvp"
  },
  "title" : "migrationPlan"
}
-->

# migrationPlan

The plan that describes the evolution of your app’s schema and how to migrate
between specific versions.

```
final let migrationPlan: (any SchemaMigrationPlan.Type)?
```

## Discussion

This property provides a reference to the migration plan you specified when
calling one the container’s initializers. If you didn’t specify one, the
property’s value is `nil`.

---

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)