---
title: NSMigratePersistentStoresAutomaticallyOption
framework: coredata
role: symbol
role_heading: Global Variable
path: coredata/nsmigratepersistentstoresautomaticallyoption
---

# NSMigratePersistentStoresAutomaticallyOption

Key to automatically attempt to migrate versioned stores.

## Declaration

```swift
let NSMigratePersistentStoresAutomaticallyOption: String
```

## Mentioned in

Migrating your data model automatically

## Discussion

Discussion The corresponding value is an NSNumber object. If the boolValue of the number is true and if the version hash information for the added store is determined to be incompatible with the model for the coordinator, Core Data will attempt to locate the source and mapping models in the application bundles, and perform a migration.

## See Also

### Constants

- [NSIgnorePersistentStoreVersioningOption](coredata/nsignorepersistentstoreversioningoption.md)
- [NSInferMappingModelAutomaticallyOption](coredata/nsinfermappingmodelautomaticallyoption.md)
