WIP: custom migration

This commit is contained in:
John Rommel Estropia
2017-05-09 03:10:35 +09:00
parent 6d04806608
commit 9d65a27557
37 changed files with 1642 additions and 588 deletions

View File

@@ -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 {