<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "swift: 5.9.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -",
    "watchOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftData",
  "identifier" : "/documentation/SwiftData/SwiftDataError/unknownDataStoreSchema",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "SwiftData"
    ],
    "preciseIdentifier" : "s:9SwiftData0aB5ErrorV07unknownB11StoreSchemaACvpZ"
  },
  "title" : "unknownDataStoreSchema"
}
-->

# unknownDataStoreSchema

An error that indicates the data store’s schema is not recognized.

```
static let unknownDataStoreSchema: SwiftDataError
```

## Discussion

This error occurs when a `ModelContainer` attempts to load a data store
whose schema does not match the current schema or any schema defined in the
provided migration plan.

When you encounter this error, the data store likely contains data from
a schema version that your app no longer supports. To resolve this:

- Add the missing schema version to your `SchemaMigrationPlan`
- Provide a custom migration stage to handle the unrecognized schema
- Consider whether the data store should be recreated

This error is only thrown on processes linked on or after macOS 27 / iOS 27.
On earlier versions, `loadIssueModelContainer` is thrown instead.

---

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)