renamed "Incremental Migrations" to "Progressive Migrations" to match the common term used by the community

This commit is contained in:
John Estropia
2016-02-17 15:34:33 +09:00
parent 8c8953c507
commit 37bf4179c8
5 changed files with 13 additions and 12 deletions

View File

@@ -15,7 +15,7 @@ Unleashing the real power of Core Data with the elegance and safety of Swift
## What CoreStore does better:
- **Heavily supports multiple persistent stores per data stack**, just the way *.xcdatamodeld* files are designed to. CoreStore will also manage one data stack by default, but you can create and manage as many as you need.
- **Incremental Migrations!** Just tell the data stack the sequence of model versions and CoreStore will automatically use incremental migrations if needed on stores added to that stack.
- **Progressive Migrations!** Just tell the data stack the sequence of model versions and CoreStore will automatically use progressive migrations if needed on stores added to that stack.
- Ability to **plug-in your own logging framework**
- Gets around a limitation with other Core Data wrappers where the entity name should be the same as the `NSManagedObject` subclass name. CoreStore loads entity-to-class mappings from the managed object model file, so you are **free to name entities and their class names independently**.
- Provides type-safe, easy to configure **observers to replace `NSFetchedResultsController` and KVO**
@@ -36,7 +36,7 @@ Unleashing the real power of Core Data with the elegance and safety of Swift
- CoreStore Tutorials (All of these have demos in the **CoreStoreDemo** app project!)
- [Setting up](#setting-up)
- [Migrations](#migrations)
- [Incremental migrations](#incremental-migrations)
- [Progressive migrations](#progressive-migrations)
- [Forecasting migrations](#forecasting-migrations)
- [Saving and processing transactions](#saving-and-processing-transactions)
- [Transaction types](#transaction-types)
@@ -70,7 +70,7 @@ Unleashing the real power of Core Data with the elegance and safety of Swift
## TL;DR (a.k.a. sample codes)
Setting-up with incremental migration support:
Setting-up with progressive migration support:
```swift
CoreStore.defaultStack = DataStack(
modelName: "MyStore",
@@ -181,7 +181,7 @@ For most cases, this configuration is usable as it is. But for more hardcore set
```swift
let dataStack = DataStack(
modelName: "MyModel", // loads from the "MyModel.xcdatamodeld" file
migrationChain: ["MyStore", "MyStoreV2", "MyStoreV3"] // model versions for incremental migrations
migrationChain: ["MyStore", "MyStoreV2", "MyStoreV3"] // model versions for progressive migrations
)
do {
@@ -291,7 +291,7 @@ progress?.setProgressHandler { [weak self] (progress) -> Void in
This closure is executed on the main thread so UIKit calls can be done safely.
### Incremental migrations
### Progressive migrations
By default, CoreStore uses Core Data's default automatic migration mechanism. In other words, CoreStore will try to migrate the existing persistent store to the *.xcdatamodeld* file's current model version. If no mapping model is found from the store's version to the data model's version, CoreStore gives up and reports an error.
The `DataStack` lets you specify hints on how to break a migration into several sub-migrations using a `MigrationChain`. This is typically passed to the `DataStack` initializer and will be applied to all stores added to the `DataStack` with `addSQLiteStore(...)` and its variants:
@@ -314,7 +314,7 @@ This allows for different migration paths depending on the starting version. The
- MyAppModelV2-MyAppModelV4
- MyAppModelV3-MyAppModelV4
Initializing with empty values (either `nil`, `[]`, or `[:]`) instructs the `DataStack` to disable incremental migrations and revert to the default migration behavior (i.e. use the .xcdatamodel's current version as the final version):
Initializing with empty values (either `nil`, `[]`, or `[:]`) instructs the `DataStack` to disable progressive migrations and revert to the default migration behavior (i.e. use the .xcdatamodel's current version as the final version):
```swift
let dataStack = DataStack(migrationChain: nil)
```