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):
// ...
}
}
-
MigrationResult.successindicates either the migration succeeded, or there were no migrations needed. The associated value is an array ofMigrationTypes reflecting the migration steps completed.Declaration
Swift
case success([MigrationType]) -
SaveResult.failureindicates that the migration failed. The associated object for this value is the aCoreStoreErrorenum value.Declaration
Swift
case failure(CoreStoreError) -
Returns
trueif the result indicates.success,falseif the result is.failure.Declaration
Swift
public var isSuccess: Bool { get }
-
Declaration
Swift
public var bridgeToObjectiveC: CSMigrationResult { get }
-
Declaration
Swift
public var debugDescription: String { get }
View on GitHub
MigrationResult Enumeration Reference