# MigrationResult Enumeration Reference

# MigrationResult

    public enum MigrationResult : Hashable

The `MigrationResult` indicates the result of a migration. The `MigrationResult` can be treated as a boolean:

    CoreStore.upgradeStorageIfNeeded(SQLiteStorage(fileName: "data.sqlite")) { (result) in
        switch result {
        case .success(let migrationSteps):
            // ...
        case .failure(let error):
            // ...
        }
    }

- `success(_:)`

  `MigrationResult.success` indicates either the migration succeeded, or there were no migrations needed. The associated value is an array of `MigrationType`s reflecting the migration steps completed.

  #### Declaration

  Swift

      case success([MigrationType])

- `failure(_:)`

  `SaveResult.failure` indicates that the migration failed. The associated object for this value is the a `CoreStoreError` enum value.

  #### Declaration

  Swift

      case failure(CoreStoreError)

- `isSuccess`

  Returns `true` if the result indicates `.success`, `false` if the result is `.failure`.

  #### Declaration

  Swift

      public var isSuccess: Bool { get }

### CoreStoreSwiftType

- `bridgeToObjectiveC`

  #### Declaration

  Swift

      public var bridgeToObjectiveC: CSMigrationResult { get }

### CustomDebugStringConvertible

- `debugDescription`

  #### Declaration

  Swift

      public var debugDescription: String { get }