mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-06-11 17:12:52 +02:00
WIP: custom migration
This commit is contained in:
@@ -203,7 +203,7 @@ public final class CoreStoreSchema: DynamicSchema {
|
||||
private static func firstPassCreateEntityDescription(from entity: AnyEntity) -> NSEntityDescription {
|
||||
|
||||
let entityDescription = NSEntityDescription()
|
||||
entityDescription.anyEntity = entity
|
||||
entityDescription.coreStoreEntity = entity
|
||||
entityDescription.name = entity.entityName
|
||||
entityDescription.isAbstract = entity.isAbstract
|
||||
entityDescription.managedObjectClassName = NSStringFromClass(NSManagedObject.self)
|
||||
|
||||
@@ -223,6 +223,11 @@ public final class SchemaHistory: ExpressibleByArrayLiteral {
|
||||
return self.schemaByVersion[modelVersion]?.rawModel()
|
||||
}
|
||||
|
||||
internal func schema(for modelVersion: ModelVersion) -> DynamicSchema? {
|
||||
|
||||
return self.schemaByVersion[modelVersion]
|
||||
}
|
||||
|
||||
internal func schema(for storeMetadata: [String: Any]) -> DynamicSchema? {
|
||||
|
||||
guard let modelHashes = storeMetadata[NSStoreModelVersionHashesKey] as! [String: Data]? else {
|
||||
|
||||
Reference in New Issue
Block a user