---
title: shouldMigrateStoreAutomatically
framework: coredata
role: symbol
role_heading: Instance Property
path: coredata/nspersistentstoredescription/shouldmigratestoreautomatically
---

# shouldMigrateStoreAutomatically

A flag indicating whether the associated persistent store should be migrated automatically.

## Declaration

```swift
var shouldMigrateStoreAutomatically: Bool { get set }
```

## Discussion

Discussion If this is set to false and the store is out of sync, attempting to load the store produces an error. If this is set to true and the store is out of sync, attempting to load the store causes Core Data to attempt a migration. This flag is set to true by default.

## See Also

### Configuring a Persistent Store Description

- [url](coredata/nspersistentstoredescription/url.md)
- [configuration](coredata/nspersistentstoredescription/configuration.md)
- [timeout](coredata/nspersistentstoredescription/timeout.md)
- [type](coredata/nspersistentstoredescription/type.md)
- [isReadOnly](coredata/nspersistentstoredescription/isreadonly.md)
- [shouldAddStoreAsynchronously](coredata/nspersistentstoredescription/shouldaddstoreasynchronously.md)
- [shouldInferMappingModelAutomatically](coredata/nspersistentstoredescription/shouldinfermappingmodelautomatically.md)
- [setOption(_:forKey:)](coredata/nspersistentstoredescription/setoption(_:forkey:).md)
- [setValue(_:forPragmaNamed:)](coredata/nspersistentstoredescription/setvalue(_:forpragmanamed:).md)
