# MigrationType

    public enum MigrationType : Hashable

    extension MigrationType: CoreStoreDebugStringConvertible

The `MigrationType` specifies the type of migration required for a store.

- `none(version:)`

  Indicates that the persistent store matches the latest model version and no migration is needed

  #### Declaration

  Swift

      case none(version: ModelVersion)

- `lightweight(sourceVersion:destinationVersion:)`

  Indicates that the persistent store does not match the latest model version but Core Data can infer the mapping model, so a lightweight migration is needed

  #### Declaration

  Swift

      case lightweight(sourceVersion: ModelVersion, destinationVersion: ModelVersion)

- `heavyweight(sourceVersion:destinationVersion:)`

  Indicates that the persistent store does not match the latest model version and Core Data could not infer a mapping model, so a custom migration is needed

  #### Declaration

  Swift

      case heavyweight(sourceVersion: ModelVersion, destinationVersion: ModelVersion)

- `sourceVersion`

  Returns the source model version for the migration type. If no migration is required, `sourceVersion` will be equal to the `destinationVersion`.

  #### Declaration

  Swift

      public var sourceVersion: ModelVersion { get }

- `destinationVersion`

  Returns the destination model version for the migration type. If no migration is required, `destinationVersion` will be equal to the `sourceVersion`.

  #### Declaration

  Swift

      public var destinationVersion: ModelVersion { get }

- `isLightweightMigration`

  Returns `true` if the `MigrationType` is a lightweight migration. Used as syntactic sugar.

  #### Declaration

  Swift

      public var isLightweightMigration: Bool { get }

- `isHeavyweightMigration`

  Returns `true` if the `MigrationType` is a heavyweight migration. Used as syntactic sugar.

  #### Declaration

  Swift

      public var isHeavyweightMigration: Bool { get }

- `hasMigration`

  Returns `true` if the `MigrationType` is either a lightweight or a heavyweight migration. Returns `false` if no migrations specified.

  #### Declaration

  Swift

      public var hasMigration: Bool { get }

### Equatable

- `==(_:_:)`

  #### Declaration

  Swift

      public static func == (lhs: MigrationType, rhs: MigrationType) -> Bool

### Hashable

- `hash(into:)`

  #### Declaration

  Swift

      public func hash(into hasher: inout Hasher)

### CustomDebugStringConvertible

- `debugDescription`

  #### Declaration

  Swift

      public var debugDescription: String { get }