Thanks Guys. The type alias stuff was getting me. I manually put the static declaration with the class in front to avoid my confusion.
Here's my latest VersionedSchema for clarity.
enum ModelSchemaV5: VersionedSchema {
static var versionIdentifier = Schema.Version(5, 0, 0)
static var models: [any PersistentModel.Type] {
[
// V1
ModelSchemaV1.SDAccountingClass.self,
ModelSchemaV1.SDCacheRecord.self,
ModelSchemaV1.SDCustomer.self,
ModelSchemaV1.SDItem.self,
ModelSchemaV1.SDLocation.self,
ModelSchemaV1.SDTag.self,
ModelSchemaV1.SDUOM.self,
// V2
ModelSchemaV2.SDPurchaseOrder.self,
ModelSchemaV2.SDPurchaseOrderItem.self,
ModelSchemaV2.SDVendor.self,
ModelSchemaV2.SDCarrier.self,
ModelSchemaV2.SDInventoryLocationSummary.self,
ModelSchemaV2.SDPurchaseOrderSettings.self,
// V3
ModelSchemaV3.SDShip.self,
ModelSchemaV3.SDSalesOrder.self,
// V4
ModelSchemaV4.SDReceipt.self,
ModelSchemaV4.SDDocument.self,
// V5
ModelSchemaV5.SDReceiptItem.self
]
}
}
Topic:
App & System Services
SubTopic:
iCloud & Data
Tags: