diff --git a/Modules/Sources/Storage/CoreData/CoreDataIterativeMigrator.swift b/Modules/Sources/Storage/CoreData/CoreDataIterativeMigrator.swift
index b7ac07f8309..95d8dc176c9 100644
--- a/Modules/Sources/Storage/CoreData/CoreDataIterativeMigrator.swift
+++ b/Modules/Sources/Storage/CoreData/CoreDataIterativeMigrator.swift
@@ -59,6 +59,18 @@ final class CoreDataIterativeMigrator {
// Find the current model used by the store.
let sourceModel = try model(for: sourceMetadata)
+ // Check if we should nuke the DB entirely based on the oldest supported data model.
+ // We will attempt to either move the merchant to the latest model version, or perform an iterative migration
+ // The persistent store coordinator will automatically create a fresh store with the current model as needed.
+ if shouldDestroyPersistentStore(for: sourceModel) {
+ do {
+ try persistentStoreCoordinator.destroyPersistentStore(at: sourceStoreURL, ofType: storeType, options: nil)
+ DDLogInfo("[CoreDataIterativeMigrator] Database at \(sourceStoreURL) destroyed successfully.")
+ } catch {
+ DDLogError("[CoreDataIterativeMigrator] Database destruction failed. Error: \(error). Falling back to iterative migration.")
+ }
+ }
+
// Get the steps to perform the migration.
let steps = try MigrationStep.steps(using: modelsInventory, source: sourceModel, target: targetModel)
guard !steps.isEmpty else {
@@ -176,4 +188,18 @@ private extension CoreDataIterativeMigrator {
.appendingPathComponent("migration_\(UUID().uuidString)")
.appendingPathExtension("sqlite")
}
+
+ func shouldDestroyPersistentStore(for sourceModel: NSManagedObjectModel) -> Bool {
+ guard let sourceVersion = CoreDataMigratorUtils.findSourceVersion(for: sourceModel, in: modelsInventory) else {
+ // If the model is not found in inventory it's from a deleted model version
+ // The database can be destroyed for a fresh start
+ DDLogInfo("Source model not found in available model versions. Will destroy database for fresh start.")
+ return true
+ }
+
+ // Model found in inventory, so it's a supported version. Use iterative migration
+ DDLogInfo("Source model \(sourceVersion.name) found in available versions. Will use iterative migration.")
+ return false
+ }
+
}
diff --git a/Modules/Sources/Storage/CoreData/CoreDataManager.swift b/Modules/Sources/Storage/CoreData/CoreDataManager.swift
index a958e1dd146..8f5326d0d06 100644
--- a/Modules/Sources/Storage/CoreData/CoreDataManager.swift
+++ b/Modules/Sources/Storage/CoreData/CoreDataManager.swift
@@ -242,7 +242,7 @@ public final class CoreDataManager: StorageManagerType {
}
/// Migrates the current persistent store to the latest data model if needed.
- /// - Returns: an array of debug messages for logging. Please feel free to remove when #2371 is resolved.
+ /// - Returns: an array of debug messages for logging.
private static func migrateDataModelIfNecessary(using coordinator: NSPersistentStoreCoordinator,
storeURL: URL,
modelsInventory: ManagedObjectModelsInventory) -> [String] {
diff --git a/Modules/Sources/Storage/CoreData/CoreDataMigratorUtils.swift b/Modules/Sources/Storage/CoreData/CoreDataMigratorUtils.swift
new file mode 100644
index 00000000000..ccb111b51ba
--- /dev/null
+++ b/Modules/Sources/Storage/CoreData/CoreDataMigratorUtils.swift
@@ -0,0 +1,19 @@
+import CoreData
+
+struct CoreDataMigratorUtils {
+ /// Finds the ModelVersion that corresponds to the given NSManagedObjectModel
+ static func findSourceVersion(for sourceModel: NSManagedObjectModel,
+ in modelsInventory: ManagedObjectModelsInventory) -> ManagedObjectModelsInventory.ModelVersion? {
+ do {
+ let allModels = try modelsInventory.models(for: modelsInventory.versions)
+ for (index, model) in allModels.enumerated() {
+ if model.isEqual(sourceModel) {
+ return modelsInventory.versions[index]
+ }
+ }
+ } catch {
+ DDLogError("[CoreDataMigratorUtils] Error loading models for version detection: \(error)")
+ }
+ return nil
+ }
+}
diff --git a/Modules/Sources/Storage/Model/MIGRATIONS.md b/Modules/Sources/Storage/Model/MIGRATIONS.md
index eb5347c7636..922e07d28d8 100644
--- a/Modules/Sources/Storage/Model/MIGRATIONS.md
+++ b/Modules/Sources/Storage/Model/MIGRATIONS.md
@@ -459,50 +459,50 @@ This file documents changes in the WCiOS Storage data model. Please explain any
- Delete `OrderStats` entity
- Delete `OrderStatsItem` entity
-## Model 29 (Release 4.7.0.0)
+## Model 29 (Release 4.7.0.0) - Deleted
- @pmusolino 2020-06-29
- Add `siteID` attribute to `ProductTag` entity
- Update `ProductTag`'s `product` relationship to `products`
- Update `Product`'s `tags` relationship with `nullify` as delete rule
- Used mapping model: `WooCommerceModelV28toV29.xcmappingmodel` to remove product tags without `siteID`
-## Model 28 (Release 4.5.0.0)
+## Model 28 (Release 4.5.0.0) - Deleted
- @jaclync 2020-06-05
- Add `buttonText` attribute to `Product` entity
-## Model 27 (Release 3.9.0.1)
+## Model 27 (Release 3.9.0.1) - Deleted
- @ecarrion 2020-03-30
- Update `ProductCategory`'s `product` relationship to `products`
- Add `siteID` and `parentID` to `ProductCategory` entity
- Used mapping model: `WooCommerceModelV26toV27.xcmappingmodel` to remove product categories without `siteID`
-## Model 26 (Release 3.5.0.0)
+## Model 26 (Release 3.5.0.0) - Deleted
- @jaclync 2019-01-14
- Update `Product`'s `images` relationship to be ordered
-## Model 25 (Release 3.4.0.0)
+## Model 25 (Release 3.4.0.0) - Deleted
- @pmusolino 2019-01-7
- Add `gmtOffset` attribute to `Site` entity
-## Model 24 (Release 3.3.0.0)
+## Model 24 (Release 3.3.0.0) - Deleted
- @jaclync 2019-12-2
- New `ProductShippingClass` entity
- Add `dateOnSaleStart` attribute to `Product` entity
- Add `dateOnSaleEnd` attribute to `Product` entity
- New `TaxClass` entity
-## Model 23 (Release 3.2.0.0)
+## Model 23 (Release 3.2.0.0) - Deleted
- @jaclync 2019-11-15
- New `Attribute` entity
- New `ProductVariation` entity
- New `Product.productVariations` relationship
-## Model 22 (Release 3.1.0.0)
+## Model 22 (Release 3.1.0.0) - Deleted
- @pmusolino 2019-11-4
- New `ShippingLine` entity
- New `Order.shippingLines` relationship
-## Model 21 (Release 2.9.0.0)
+## Model 21 (Release 2.9.0.0) - Deleted
- @mindgraffiti 2019-10-11
- New `OrderItemTax` entity
- New `OrderItemTaxRefund` entity
@@ -512,7 +512,7 @@ This file documents changes in the WCiOS Storage data model. Please explain any
- New `Refund` entity
- New `Refund.items` relationship
-## Model 20 (Release 2.8.0.0)
+## Model 20 (Release 2.8.0.0) - Deleted
- @jaclync 2019-09-17
- New `ProductSearchResults` entity
- New `Product.searchResults` relationship
@@ -524,7 +524,7 @@ This file documents changes in the WCiOS Storage data model. Please explain any
- New `OrderRefundCondensed` entity
- New `Order.refunds` relationship
-## Model 19 (Release 2.6.0.0)
+## Model 19 (Release 2.6.0.0) - Deleted
- @ctarda 2019-08-21
- Add `ProductReview` entity
@@ -534,33 +534,33 @@ This file documents changes in the WCiOS Storage data model. Please explain any
- @jaclync 2019-08-06
- Add `timeRange` attribute to `OrderStatsV4` entity
-## Model 18 (Release 2.5.0.0)
+## Model 18 (Release 2.5.0.0) - Deleted
- @ctarda 2019-07-30
- Add `OrderCount` entity
- Add `OrderCountItem` entity
-## Model 17 (Release 2.3.0.0)
+## Model 17 (Release 2.3.0.0) - Deleted
- @ctarda 2019-07-10
- Add `OrderStatsV4` entity
- Add `OrderStatsV4Totals` entity
- Add `OrderStatsV4Interval` entity
-## Model 16 (Release 2.0.0.0)
+## Model 16 (Release 2.0.0.0) - Deleted
- @mindgraffiti 2019-05-29
- Add `ProductDownload` entity
-## Model 15 (Release 1.9.0.0)
+## Model 15 (Release 1.9.0.0) - Deleted
- @mindgraffiti 2019-05-03
- Delete `ProductVariation` entity
- Delete `ProductVariationAttribute` entity
- Delete `ProductVariationDimensions` entity
- Delete `ProductVariationImage` entity
-## Model 14 (Release 1.8.0.0)
+## Model 14 (Release 1.8.0.0) - Deleted
- @astralbodies 2019-04-22
- New `AccountSettings` entity with `tracksOptOut` attribute.
-## Model 13 (Release 1.6.0.0)
+## Model 13 (Release 1.6.0.0) - Deleted
- @bummytime 2019-03-28
- Added `settingGroupKey` attribute on `SiteSetting` entity
@@ -570,7 +570,7 @@ This file documents changes in the WCiOS Storage data model. Please explain any
- New `ProductVariationDimensions` entity
- New `ProductVariationImage` entity
-## Model 12 (Release 1.5.0.0)
+## Model 12 (Release 1.5.0.0) - Deleted
- @bummytime 2019-03-20
- New `Product` entity
- New `ProductDefaultAttribute` entity
@@ -583,13 +583,13 @@ This file documents changes in the WCiOS Storage data model. Please explain any
- @ctarda 2019-03-14
- Adds `ShipmentTrackingProvider` and `ShipmentTrackingProviderGroup`
-## Model 11 (Release 1.4.0.0)
+## Model 11 (Release 1.4.0.0) - Deleted
- @mindgraffiti 2019-02-27
- Adds `siteID` and `total` attributes to `OrderStatus`
- Changes `name` and `total` on `OrderStatus` to be optional
-## Model 10 (Release 1.3.0.0)
+## Model 10 (Release 1.3.0.0) - Deleted
Used mapping model: `WooCommerceModelV9toV10.xcmappingmodel`
- @astralbodies 2019-02-08
@@ -602,29 +602,29 @@ Used mapping model: `WooCommerceModelV9toV10.xcmappingmodel`
- Changes `status` attribute on `Order` to `statusKey`
- New `OrderStatus` entity
-## Model 9 (Release 1.0.0.1)
+## Model 9 (Release 1.0.0.1) - Deleted
- @bummytime 2019-01-11
- Added `price` attribute on `OrderItem` entity
Note: the 1.0.0 model 9 never made it to our users so we are not reving the version #.
-## Model 9 (Release 1.0.0)
+## Model 9 (Release 1.0.0) - Deleted
- @jleandroperez 2018-12-26
- New `Order.exclusiveForSearch` property
- New `OrderSearchResults` entity
-## Model 8 (Release 0.13)
+## Model 8 (Release 0.13) - Deleted
- @jleandroperez 2018-12-14
- Removed `Site.isJetpackInstalled` attribute.
- @bummytime 2018-12-11
- New `OrderNote.author` attribute
-## Model 7
+## Model 7 - Deleted
- @bummytime 2018-11-26
- New `Note.deleteInProgress` property
-## Model 6
+## Model 6 - Deleted
- @jleandroperez 2018-11-15
- New `Note.siteID` property
@@ -635,26 +635,26 @@ Note: the 1.0.0 model 9 never made it to our users so we are not reving the vers
- Added new attribute: `isJetpackInstalled`, to site entity
- Added new attribute: `plan`, to site entity
-## Model 5
+## Model 5 - Deleted
- @bummytime 2018-10-26
- Added new entity: `Note`, to encapsulate all things notifications
- @bummytime 2018-10-23
- Added new entity: `SiteSetting`, to encapsulate all of the site settings
-## Model 4
+## Model 4 - Deleted
- @bummytime 2018-10-09
- Added new entity: `SiteVisitStats`, to encapsulate all of the visitor stats for a given site & granularity
- Added new entity: `SiteVisitStatsItem`, to encapsulate all the visitor stats for a specific period
- Added new entity: `OrderStats`, to encapsulate all of the order stats for a given site & granularity
- Added new entity: `OrderStatsItem`, to encapsulate all the order stats for a specific period
-## Model 3
+## Model 3 - Deleted
- @bummytime 2018-09-19
- Widened `quantity` attribute on `OrderItem` from Int16 to Int64
- Widened `quantity` attribute on `TopEarnerStatsItem` from Int16 to Int64
-## Model 2
+## Model 2 - Deleted
- @bummytime 2018-09-05
- Added new entity: `TopEarnerStats`, to encapsulate all of the top earner stats for a given site & granularity
- Added new entity: `TopEarnerStatsItem`, to encapsulate all the top earner stats for a specific product
diff --git a/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 10.xcdatamodel/contents b/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 10.xcdatamodel/contents
deleted file mode 100644
index 1fe89e145b2..00000000000
--- a/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 10.xcdatamodel/contents
+++ /dev/null
@@ -1,218 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 11.xcdatamodel/contents b/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 11.xcdatamodel/contents
deleted file mode 100644
index 0a5a0b725a7..00000000000
--- a/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 11.xcdatamodel/contents
+++ /dev/null
@@ -1,220 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 12.xcdatamodel/contents b/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 12.xcdatamodel/contents
deleted file mode 100644
index a1b9e28a4c0..00000000000
--- a/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 12.xcdatamodel/contents
+++ /dev/null
@@ -1,340 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 13.xcdatamodel/contents b/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 13.xcdatamodel/contents
deleted file mode 100644
index f230f8ff6e8..00000000000
--- a/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 13.xcdatamodel/contents
+++ /dev/null
@@ -1,403 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 14.xcdatamodel/contents b/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 14.xcdatamodel/contents
deleted file mode 100644
index ff2906ed690..00000000000
--- a/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 14.xcdatamodel/contents
+++ /dev/null
@@ -1,408 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 15.xcdatamodel/contents b/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 15.xcdatamodel/contents
deleted file mode 100644
index 06271a85139..00000000000
--- a/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 15.xcdatamodel/contents
+++ /dev/null
@@ -1,346 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 16.xcdatamodel/contents b/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 16.xcdatamodel/contents
deleted file mode 100644
index cac05ba4cc7..00000000000
--- a/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 16.xcdatamodel/contents
+++ /dev/null
@@ -1,354 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 17.xcdatamodel/contents b/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 17.xcdatamodel/contents
deleted file mode 100644
index 457a5998399..00000000000
--- a/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 17.xcdatamodel/contents
+++ /dev/null
@@ -1,384 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 18.xcdatamodel/contents b/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 18.xcdatamodel/contents
deleted file mode 100644
index c659a9fd02b..00000000000
--- a/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 18.xcdatamodel/contents
+++ /dev/null
@@ -1,396 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 19.xcdatamodel/contents b/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 19.xcdatamodel/contents
deleted file mode 100644
index 151d0e0586c..00000000000
--- a/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 19.xcdatamodel/contents
+++ /dev/null
@@ -1,411 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 2.xcdatamodel/contents b/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 2.xcdatamodel/contents
deleted file mode 100644
index 22943df1b52..00000000000
--- a/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 2.xcdatamodel/contents
+++ /dev/null
@@ -1,117 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 20.xcdatamodel/contents b/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 20.xcdatamodel/contents
deleted file mode 100644
index 9f9e98e93c9..00000000000
--- a/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 20.xcdatamodel/contents
+++ /dev/null
@@ -1,426 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 21.xcdatamodel/contents b/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 21.xcdatamodel/contents
deleted file mode 100644
index 5db6f05ef0b..00000000000
--- a/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 21.xcdatamodel/contents
+++ /dev/null
@@ -1,471 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 22.xcdatamodel/contents b/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 22.xcdatamodel/contents
deleted file mode 100644
index cff431365a0..00000000000
--- a/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 22.xcdatamodel/contents
+++ /dev/null
@@ -1,481 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 23.xcdatamodel/contents b/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 23.xcdatamodel/contents
deleted file mode 100644
index 66f4de3ea7d..00000000000
--- a/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 23.xcdatamodel/contents
+++ /dev/null
@@ -1,532 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 24.xcdatamodel/contents b/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 24.xcdatamodel/contents
deleted file mode 100644
index 22e9d95a140..00000000000
--- a/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 24.xcdatamodel/contents
+++ /dev/null
@@ -1,551 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 25.xcdatamodel/contents b/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 25.xcdatamodel/contents
deleted file mode 100644
index 4857ae15c11..00000000000
--- a/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 25.xcdatamodel/contents
+++ /dev/null
@@ -1,552 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 26.xcdatamodel/contents b/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 26.xcdatamodel/contents
deleted file mode 100644
index 11669818560..00000000000
--- a/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 26.xcdatamodel/contents
+++ /dev/null
@@ -1,552 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 27.xcdatamodel/contents b/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 27.xcdatamodel/contents
deleted file mode 100644
index 223e2bdcec2..00000000000
--- a/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 27.xcdatamodel/contents
+++ /dev/null
@@ -1,554 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 28.xcdatamodel/contents b/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 28.xcdatamodel/contents
deleted file mode 100644
index bddd5eb327f..00000000000
--- a/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 28.xcdatamodel/contents
+++ /dev/null
@@ -1,555 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 29.xcdatamodel/contents b/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 29.xcdatamodel/contents
deleted file mode 100644
index 3f2dba5de47..00000000000
--- a/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 29.xcdatamodel/contents
+++ /dev/null
@@ -1,556 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 3.xcdatamodel/contents b/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 3.xcdatamodel/contents
deleted file mode 100644
index 06b7d3a0b7a..00000000000
--- a/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 3.xcdatamodel/contents
+++ /dev/null
@@ -1,117 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 4.xcdatamodel/contents b/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 4.xcdatamodel/contents
deleted file mode 100644
index 6b229987a41..00000000000
--- a/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 4.xcdatamodel/contents
+++ /dev/null
@@ -1,166 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 5.xcdatamodel/contents b/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 5.xcdatamodel/contents
deleted file mode 100644
index a0c54e55213..00000000000
--- a/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 5.xcdatamodel/contents
+++ /dev/null
@@ -1,190 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 6.xcdatamodel/contents b/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 6.xcdatamodel/contents
deleted file mode 100644
index 79212712051..00000000000
--- a/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 6.xcdatamodel/contents
+++ /dev/null
@@ -1,194 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 7.xcdatamodel/contents b/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 7.xcdatamodel/contents
deleted file mode 100644
index b967902214b..00000000000
--- a/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 7.xcdatamodel/contents
+++ /dev/null
@@ -1,195 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 8.xcdatamodel/contents b/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 8.xcdatamodel/contents
deleted file mode 100644
index 0ff61611fe2..00000000000
--- a/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 8.xcdatamodel/contents
+++ /dev/null
@@ -1,195 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 9.xcdatamodel/contents b/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 9.xcdatamodel/contents
deleted file mode 100644
index d74b37d2ba7..00000000000
--- a/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model 9.xcdatamodel/contents
+++ /dev/null
@@ -1,203 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model.xcdatamodel/contents b/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model.xcdatamodel/contents
deleted file mode 100644
index 6617d863d14..00000000000
--- a/Modules/Sources/Storage/Resources/WooCommerce.xcdatamodeld/Model.xcdatamodel/contents
+++ /dev/null
@@ -1,99 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Modules/Sources/Storage/Resources/WooCommerceModelV26toV27.xcmappingmodel/xcmapping.xml b/Modules/Sources/Storage/Resources/WooCommerceModelV26toV27.xcmappingmodel/xcmapping.xml
deleted file mode 100644
index 7fbc9574777..00000000000
--- a/Modules/Sources/Storage/Resources/WooCommerceModelV26toV27.xcmappingmodel/xcmapping.xml
+++ /dev/null
@@ -1,2221 +0,0 @@
-
-
-
-
-
- 134481920
- 5394C77D-352F-4F49-BE5B-2E93DB8A98CA
- 562
-
-
-
- NSPersistenceFrameworkVersion
- 977
- NSStoreModelVersionHashes
-
- XDDevAttributeMapping
-
- 0plcXXRN7XHKl5CcF+fwriFmUpON3ZtcI/AfK748aWc=
-
- XDDevEntityMapping
-
- qeN1Ym3TkWN1G6dU9RfX6Kd2ccEvcDVWHpd3LpLgboI=
-
- XDDevMappingModel
-
- EqtMzvRnVZWkXwBHu4VeVGy8UyoOe+bi67KC79kphlQ=
-
- XDDevPropertyMapping
-
- XN33V44TTGY4JETlMoOB5yyTKxB+u4slvDIinv0rtGA=
-
- XDDevRelationshipMapping
-
- akYY9LhehVA/mCb4ATLWuI9XGLcjpm14wWL1oEBtIcs=
-
-
- NSStoreModelVersionHashesDigest
- +Hmc2uYZK6og+Pvx5GUJ7oW75UG4V/ksQanTjfTKUnxyGWJRMtB5tIRgVwGsrd7lz/QR57++wbvWsr6nxwyS0A==
- NSStoreModelVersionHashesVersion
- 3
- NSStoreModelVersionIdentifiers
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Modules/Sources/Storage/Resources/WooCommerceModelV28toV29.xcmappingmodel/xcmapping.xml b/Modules/Sources/Storage/Resources/WooCommerceModelV28toV29.xcmappingmodel/xcmapping.xml
deleted file mode 100644
index b84789f3a11..00000000000
--- a/Modules/Sources/Storage/Resources/WooCommerceModelV28toV29.xcmappingmodel/xcmapping.xml
+++ /dev/null
@@ -1,2236 +0,0 @@
-
-
-
-
-
- 134481920
- 825006A1-8027-4C37-A868-D47ECA8E94CD
- 563
-
-
-
- NSPersistenceFrameworkVersion
- 977
- NSStoreModelVersionHashes
-
- XDDevAttributeMapping
-
- 0plcXXRN7XHKl5CcF+fwriFmUpON3ZtcI/AfK748aWc=
-
- XDDevEntityMapping
-
- qeN1Ym3TkWN1G6dU9RfX6Kd2ccEvcDVWHpd3LpLgboI=
-
- XDDevMappingModel
-
- EqtMzvRnVZWkXwBHu4VeVGy8UyoOe+bi67KC79kphlQ=
-
- XDDevPropertyMapping
-
- XN33V44TTGY4JETlMoOB5yyTKxB+u4slvDIinv0rtGA=
-
- XDDevRelationshipMapping
-
- akYY9LhehVA/mCb4ATLWuI9XGLcjpm14wWL1oEBtIcs=
-
-
- NSStoreModelVersionHashesDigest
- +Hmc2uYZK6og+Pvx5GUJ7oW75UG4V/ksQanTjfTKUnxyGWJRMtB5tIRgVwGsrd7lz/QR57++wbvWsr6nxwyS0A==
- NSStoreModelVersionHashesVersion
- 3
- NSStoreModelVersionIdentifiers
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Modules/Sources/Storage/Resources/WooCommerceModelV9toV10.xcmappingmodel/xcmapping.xml b/Modules/Sources/Storage/Resources/WooCommerceModelV9toV10.xcmappingmodel/xcmapping.xml
deleted file mode 100644
index 138e260e2e0..00000000000
--- a/Modules/Sources/Storage/Resources/WooCommerceModelV9toV10.xcmappingmodel/xcmapping.xml
+++ /dev/null
@@ -1,891 +0,0 @@
-
-
-
-
-
- 134481920
- EDF1EE7E-772F-4468-A16B-6280B62211AE
- 281
-
-
-
- NSPersistenceFrameworkVersion
- 866
- NSStoreModelVersionHashes
-
- XDDevAttributeMapping
-
- 0plcXXRN7XHKl5CcF+fwriFmUpON3ZtcI/AfK748aWc=
-
- XDDevEntityMapping
-
- qeN1Ym3TkWN1G6dU9RfX6Kd2ccEvcDVWHpd3LpLgboI=
-
- XDDevMappingModel
-
- EqtMzvRnVZWkXwBHu4VeVGy8UyoOe+bi67KC79kphlQ=
-
- XDDevPropertyMapping
-
- XN33V44TTGY4JETlMoOB5yyTKxB+u4slvDIinv0rtGA=
-
- XDDevRelationshipMapping
-
- akYY9LhehVA/mCb4ATLWuI9XGLcjpm14wWL1oEBtIcs=
-
-
- NSStoreModelVersionHashesVersion
- 3
- NSStoreModelVersionIdentifiers
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Modules/Tests/StorageTests/CoreData/CoreDataIterativeMigrator+MigrationStepTests.swift b/Modules/Tests/StorageTests/CoreData/CoreDataIterativeMigrator+MigrationStepTests.swift
index f03553783f6..c05bbad2b8f 100644
--- a/Modules/Tests/StorageTests/CoreData/CoreDataIterativeMigrator+MigrationStepTests.swift
+++ b/Modules/Tests/StorageTests/CoreData/CoreDataIterativeMigrator+MigrationStepTests.swift
@@ -24,42 +24,42 @@ final class CoreDataIterativeMigrator_MigrationStepTests: XCTestCase {
func test_steps_returns_MigrationSteps_from_source_to_the_target_model() throws {
// Given
- let modelVersion23 = ModelVersion(name: "Model 23")
- let modelVersion31 = ModelVersion(name: "Model 31")
- let sourceModel = try XCTUnwrap(modelsInventory.model(for: modelVersion23))
- let targetModel = try XCTUnwrap(modelsInventory.model(for: modelVersion31))
+ let modelVersion33 = ModelVersion(name: "Model 33")
+ let modelVersion41 = ModelVersion(name: "Model 41")
+ let sourceModel = try XCTUnwrap(modelsInventory.model(for: modelVersion33))
+ let targetModel = try XCTUnwrap(modelsInventory.model(for: modelVersion41))
// When
let steps = try MigrationStep.steps(using: modelsInventory, source: sourceModel, target: targetModel)
// Then
// There should be 8 steps:
- // - 23 to 24
- // - 24 to 25
- // - 25 to 26
- // - 26 to 27
- // - 27 to 28
- // - 28 to 29
- // - 29 to 30
- // - 30 to 31
+ // - 33 to 34
+ // - 34 to 35
+ // - 35 to 36
+ // - 36 to 37
+ // - 37 to 38
+ // - 38 to 39
+ // - 39 to 40
+ // - 40 to 41
XCTAssertEqual(steps.count, 8)
// Assert the values of first and last steps.
- let modelVersion24 = ModelVersion(name: "Model 24")
+ let modelVersion34 = ModelVersion(name: "Model 34")
- let expectedFirstStep = MigrationStep(sourceVersion: modelVersion23,
- sourceModel: try XCTUnwrap(modelsInventory.model(for: modelVersion23)),
- targetVersion: modelVersion24,
- targetModel: try XCTUnwrap(modelsInventory.model(for: modelVersion24)))
+ let expectedFirstStep = MigrationStep(sourceVersion: modelVersion33,
+ sourceModel: try XCTUnwrap(modelsInventory.model(for: modelVersion33)),
+ targetVersion: modelVersion34,
+ targetModel: try XCTUnwrap(modelsInventory.model(for: modelVersion34)))
let actualFirstStep = try XCTUnwrap(steps.first)
XCTAssertEqual(actualFirstStep, expectedFirstStep)
- let modelVersion30 = ModelVersion(name: "Model 30")
+ let modelVersion40 = ModelVersion(name: "Model 40")
- let expectedLastStep = MigrationStep(sourceVersion: modelVersion30,
- sourceModel: try XCTUnwrap(modelsInventory.model(for: modelVersion30)),
- targetVersion: modelVersion31,
- targetModel: try XCTUnwrap(modelsInventory.model(for: modelVersion31)))
+ let expectedLastStep = MigrationStep(sourceVersion: modelVersion40,
+ sourceModel: try XCTUnwrap(modelsInventory.model(for: modelVersion40)),
+ targetVersion: modelVersion41,
+ targetModel: try XCTUnwrap(modelsInventory.model(for: modelVersion41)))
let actualLastStep = try XCTUnwrap(steps.last)
XCTAssertEqual(actualLastStep, expectedLastStep)
}
@@ -140,13 +140,23 @@ final class CoreDataIterativeMigrator_MigrationStepTests: XCTestCase {
/// reach this condition because of the precondition checks in `CoreDataIterativeMigrator`.
func test_steps_returns_source_to_latest_version_MigrationSteps_if_the_source_and_target_are_the_same() throws {
// Given
- let modelVersion37 = ModelVersion(name: "Model 37")
+ let sourceModelName = "Model 37"
+ let modelVersion37 = ModelVersion(name: sourceModelName)
let sourceModel = try XCTUnwrap(modelsInventory.model(for: modelVersion37))
+ // Find the index of Model 37 in the current inventory
+ // which only contains Models 30-124 as per latest update on https://github.com/woocommerce/woocommerce-ios/pull/15987
+ let sourceModelIndex = try XCTUnwrap(modelsInventory.versions.firstIndex { $0.name == sourceModelName },
+ "Model 37 should exist in the inventory")
// When
let steps = try MigrationStep.steps(using: modelsInventory, source: sourceModel, target: sourceModel)
// Then
- XCTAssertEqual(steps.count, modelsInventory.versions.count - 37)
+ // Expected behavior (bug): When source == target, it returns steps from that model to the latest version
+ // This means: Model 37 → Model 38 → ... → Model 124
+ // Calculation: total versions - source index - 1 (since we don't include the source model itself)
+ let expectedStepCount = modelsInventory.versions.count - sourceModelIndex - 1
+ XCTAssertEqual(steps.count, expectedStepCount,
+ "Should return steps from Model 37 to the latest model (Model 124)")
}
}
diff --git a/Modules/Tests/StorageTests/CoreData/CoreDataIterativeMigratorTests.swift b/Modules/Tests/StorageTests/CoreData/CoreDataIterativeMigratorTests.swift
index d2be579fd2d..2559b3d2e7e 100644
--- a/Modules/Tests/StorageTests/CoreData/CoreDataIterativeMigratorTests.swift
+++ b/Modules/Tests/StorageTests/CoreData/CoreDataIterativeMigratorTests.swift
@@ -106,7 +106,7 @@ final class CoreDataIterativeMigratorTests: XCTestCase {
func test_it_will_not_migrate_if_the_database_file_does_not_exist() throws {
// Given
- let targetModel = try managedObjectModel(for: "Model 28")
+ let targetModel = try managedObjectModel(for: "Model 38")
let databaseURL = documentsDirectory.appendingPathComponent("database-file-that-does-not-exist")
let fileManager = MockFileManager()
@@ -139,14 +139,14 @@ final class CoreDataIterativeMigratorTests: XCTestCase {
/// files using the wrong `NSManagedObjectModel`.
func test_opening_a_store_with_a_different_model_fails() throws {
// Given
- let model1 = try managedObjectModel(for: "Model")
- let model10 = try managedObjectModel(for: "Model 10")
+ let model30 = try managedObjectModel(for: "Model 30")
+ let model40 = try managedObjectModel(for: "Model 40")
- let storeURL = try urlForStore(withName: "Woo Test 10.sqlite", deleteIfExists: true)
+ let storeURL = try urlForStore(withName: "Woo Test 30.sqlite", deleteIfExists: true)
let options = [NSInferMappingModelAutomaticallyOption: false, NSMigratePersistentStoresAutomaticallyOption: false]
// When
- var psc = NSPersistentStoreCoordinator(managedObjectModel: model1)
+ var psc = NSPersistentStoreCoordinator(managedObjectModel: model30)
var ps = try? psc.addPersistentStore(ofType: NSSQLiteStoreType, configurationName: nil, at: storeURL, options: options)
XCTAssertNotNil(ps)
@@ -154,21 +154,21 @@ final class CoreDataIterativeMigratorTests: XCTestCase {
try psc.remove(ps!)
// Load using a different model
- psc = NSPersistentStoreCoordinator(managedObjectModel: model10)
+ psc = NSPersistentStoreCoordinator(managedObjectModel: model40)
ps = try? psc.addPersistentStore(ofType: NSSQLiteStoreType, configurationName: nil, at: storeURL, options: options)
// When
XCTAssertNil(ps)
}
- /// Test the IterativeMigrator can migrate iteratively between model 1 to 10.
- func test_iterativeMigrate_can_iteratively_migrate_from_model_1_to_model_10() throws {
+ /// Test the IterativeMigrator can migrate iteratively between model 30 to 40.
+ func test_iterativeMigrate_can_iteratively_migrate_from_model_30_to_model_40() throws {
// Given
let storeType = NSSQLiteStoreType
- let sourceModel = try managedObjectModel(for: "Model")
- let targetModel = try managedObjectModel(for: "Model 10")
+ let sourceModel = try managedObjectModel(for: "Model 30")
+ let targetModel = try managedObjectModel(for: "Model 40")
- let storeURL = try urlForStore(withName: "Woo Test 10.sqlite", deleteIfExists: true)
+ let storeURL = try urlForStore(withName: "Woo Test 30.sqlite", deleteIfExists: true)
let container = try startPersistentContainer(storeURL: storeURL, storeType: storeType, model: sourceModel)
@@ -187,12 +187,12 @@ final class CoreDataIterativeMigratorTests: XCTestCase {
// Start another container. If there is no error, then the migration was successful.
let _ = try startPersistentContainer(storeURL: storeURL, storeType: storeType, model: targetModel)
- // There are 9 destroyed URLs because 9 migration steps should have happened between
- // "Model" to "Model 10":
+ // There are 10 destroyed URLs because 9 migration steps should have happened between
+ // "Model 30" to "Model 40":
//
- // 1 → 2, 2 → 3, 3 → 4, 4 → 5, 5 → 6, 6 → 7, 7 → 8, 8 → 9, 9 → 10
+ // 30 → 31 → ... → 40
//
- XCTAssertEqual(spyCoordinator.destroyedURLs.count, 9)
+ XCTAssertEqual(spyCoordinator.destroyedURLs.count, 10)
// But there is only one replacement, which is the final step in the iterative migration.
XCTAssertEqual(spyCoordinator.replacements.count, 1)
@@ -246,7 +246,7 @@ final class CoreDataIterativeMigratorTests: XCTestCase {
func test_iterativeMigrate_will_not_migrate_if_the_database_and_the_model_are_compatible() throws {
// Given
- let model = try managedObjectModel(for: "Model 28")
+ let model = try managedObjectModel(for: "Model 38")
// Start a container to create an existing database file.
let storeURL = try urlForStore(withName: "Woo_Compatibility_Test.sqlite", deleteIfExists: true)
@@ -272,6 +272,29 @@ final class CoreDataIterativeMigratorTests: XCTestCase {
assertEmpty(spyCoordinator.replacements)
assertEmpty(spyCoordinator.destroyedURLs)
}
+
+ func test_findSourceVersion_when_exists_then_returns_correct_version_for_existing_model() throws {
+ // Given
+ let targetVersion = ManagedObjectModelsInventory.ModelVersion(name: "Model 30")
+ let targetModel = try XCTUnwrap(modelsInventory.model(for: targetVersion))
+
+ // When
+ let foundVersion = CoreDataMigratorUtils.findSourceVersion(for: targetModel, in: modelsInventory)
+
+ // Then
+ XCTAssertEqual(foundVersion?.name, "Model 30")
+ }
+
+ func test_findSourceVersion_when_unknown_model_then_returns_nil() throws {
+ // Given
+ let fakeModel = NSManagedObjectModel()
+
+ // When
+ let foundVersion = CoreDataMigratorUtils.findSourceVersion(for: fakeModel, in: modelsInventory)
+
+ // Then
+ XCTAssertNil(foundVersion)
+ }
}
/// Helpers for the Core Data migration tests
diff --git a/Modules/Tests/StorageTests/CoreData/CoreDataManagerTests.swift b/Modules/Tests/StorageTests/CoreData/CoreDataManagerTests.swift
index 44547df40ee..933d5618131 100644
--- a/Modules/Tests/StorageTests/CoreData/CoreDataManagerTests.swift
+++ b/Modules/Tests/StorageTests/CoreData/CoreDataManagerTests.swift
@@ -184,7 +184,7 @@ final class CoreDataManagerTests: XCTestCase {
}
XCTAssertEqual(manager.viewStorage.countObjects(ofType: Account.self), 1)
- XCTAssertNotNil(NSEntityDescription.entity(forEntityName: Note.entityName,
+ XCTAssertNotNil(NSEntityDescription.entity(forEntityName: OrderFeeLine.entityName,
in: manager.viewStorage as! NSManagedObjectContext))
// When
@@ -193,8 +193,8 @@ final class CoreDataManagerTests: XCTestCase {
// recreate the database.
let invalidModelsInventory = ManagedObjectModelsInventory(
packageURL: modelsInventory.packageURL,
- currentModel: try XCTUnwrap(modelsInventory.model(for: .init(name: "Model 2"))),
- versions: [.init(name: "Model 2")]
+ currentModel: try XCTUnwrap(modelsInventory.model(for: .init(name: "Model 30"))),
+ versions: [.init(name: "Model 30")]
)
manager = try makeManager(using: invalidModelsInventory, deletingExistingStoreFiles: false)
@@ -211,8 +211,9 @@ final class CoreDataManagerTests: XCTestCase {
insertAccount(to: manager.viewStorage)
XCTAssertEqual(manager.viewStorage.countObjects(ofType: Account.self), 2)
- // The Note entity does not exist in Model 2. This proves that the store was reset to Model 2.
- XCTAssertNil(NSEntityDescription.entity(forEntityName: Note.entityName,
+ // The OrderFeeLine entity does not exist in Model 30, was introduced in Model 42
+ // This proves that the store was reset to Model 30.
+ XCTAssertNil(NSEntityDescription.entity(forEntityName: OrderFeeLine.entityName,
in: manager.viewStorage as! NSManagedObjectContext))
}
diff --git a/Modules/Tests/StorageTests/CoreData/ManagedObjectModelsInventoryTests.swift b/Modules/Tests/StorageTests/CoreData/ManagedObjectModelsInventoryTests.swift
index 5b94e8d65b6..0c38ab60640 100644
--- a/Modules/Tests/StorageTests/CoreData/ManagedObjectModelsInventoryTests.swift
+++ b/Modules/Tests/StorageTests/CoreData/ManagedObjectModelsInventoryTests.swift
@@ -29,35 +29,6 @@ final class ManagedObjectModelsInventoryTests: XCTestCase {
func test_it_can_load_the_expected_model_versions() throws {
// Given
let expectedVersionNames = [
- "Model",
- "Model 2",
- "Model 3",
- "Model 4",
- "Model 5",
- "Model 6",
- "Model 7",
- "Model 8",
- "Model 9",
- "Model 10",
- "Model 11",
- "Model 12",
- "Model 13",
- "Model 14",
- "Model 15",
- "Model 16",
- "Model 17",
- "Model 18",
- "Model 19",
- "Model 20",
- "Model 21",
- "Model 22",
- "Model 23",
- "Model 24",
- "Model 25",
- "Model 26",
- "Model 27",
- "Model 28",
- "Model 29",
"Model 30",
"Model 31",
"Model 32",
@@ -145,7 +116,14 @@ final class ManagedObjectModelsInventoryTests: XCTestCase {
"Model 114",
"Model 115",
"Model 116",
- "Model 117"
+ "Model 117",
+ "Model 118",
+ "Model 119",
+ "Model 120",
+ "Model 121",
+ "Model 122",
+ "Model 123",
+ "Model 124"
]
// When
diff --git a/Modules/Tests/StorageTests/CoreData/MigrationTests.swift b/Modules/Tests/StorageTests/CoreData/MigrationTests.swift
index b892b1e470a..46295f3db18 100644
--- a/Modules/Tests/StorageTests/CoreData/MigrationTests.swift
+++ b/Modules/Tests/StorageTests/CoreData/MigrationTests.swift
@@ -48,107 +48,6 @@ final class MigrationTests: XCTestCase {
try super.tearDownWithError()
}
- func test_migrating_from_26_to_27_deletes_ProductCategory_objects() throws {
- // Arrange
- let sourceContainer = try startPersistentContainer("Model 26")
- let sourceContext = sourceContainer.viewContext
-
- insertAccount(to: sourceContext)
- let product = insertProduct(to: sourceContext, forModel: 26)
- let productCategory = insertProductCategory(to: sourceContext)
- product.mutableSetValue(forKey: "categories").add(productCategory)
-
- try sourceContext.save()
-
- XCTAssertEqual(try sourceContext.count(entityName: "Account"), 1)
- XCTAssertEqual(try sourceContext.count(entityName: "Product"), 1)
- XCTAssertEqual(try sourceContext.count(entityName: "ProductCategory"), 1)
-
- // Action
- let targetContainer = try migrate(sourceContainer, to: "Model 27")
- let targetContext = targetContainer.viewContext
-
- // Assert
- XCTAssertEqual(try targetContext.count(entityName: "Account"), 1)
- XCTAssertEqual(try targetContext.count(entityName: "Product"), 1)
- // Product categories should be deleted.
- XCTAssertEqual(try targetContext.count(entityName: "ProductCategory"), 0)
- }
-
- func test_migrating_from_28_to_29_deletes_ProductTag_objects() throws {
- // Arrange
- let sourceContainer = try startPersistentContainer("Model 28")
- let sourceContext = sourceContainer.viewContext
-
- insertAccount(to: sourceContext)
- let product = insertProduct(to: sourceContext, forModel: 28)
- let productTag = insertProductTag(to: sourceContext)
- product.mutableSetValue(forKey: "tags").add(productTag)
-
- try sourceContext.save()
-
- XCTAssertEqual(try sourceContext.count(entityName: "Account"), 1)
- XCTAssertEqual(try sourceContext.count(entityName: "Product"), 1)
- XCTAssertEqual(try sourceContext.count(entityName: "ProductTag"), 1)
-
- // Action
- let targetContainer = try migrate(sourceContainer, to: "Model 29")
-
- // Assert
- let targetContext = targetContainer.viewContext
- XCTAssertEqual(try targetContext.count(entityName: "Account"), 1)
- XCTAssertEqual(try targetContext.count(entityName: "Product"), 1)
- // Product tags should be deleted.
- XCTAssertEqual(try targetContext.count(entityName: "ProductTag"), 0)
- }
-
- func test_migrating_from_20_to_28_will_keep_transformable_attributes() throws {
- // Arrange
- let sourceContainer = try startPersistentContainer("Model 20")
- let sourceContext = sourceContainer.viewContext
-
- let product = insertProduct(to: sourceContext, forModel: 20)
- // Populates transformable attributes.
- let productCrossSellIDs: [Int64] = [630, 688]
- let groupedProductIDs: [Int64] = [94, 134]
- let productRelatedIDs: [Int64] = [270, 37]
- let productUpsellIDs: [Int64] = [1126, 1216]
- let productVariationIDs: [Int64] = [927, 1110]
- product.setValue(productCrossSellIDs, forKey: "crossSellIDs")
- product.setValue(groupedProductIDs, forKey: "groupedProducts")
- product.setValue(productRelatedIDs, forKey: "relatedIDs")
- product.setValue(productUpsellIDs, forKey: "upsellIDs")
- product.setValue(productVariationIDs, forKey: "variations")
-
- let productAttribute = insertProductAttribute(to: sourceContext)
- // Populates transformable attributes.
- let attributeOptions = ["Woody", "Andy Panda"]
- productAttribute.setValue(attributeOptions, forKey: "options")
-
- product.mutableSetValue(forKey: "attributes").add(productAttribute)
-
- try sourceContext.save()
-
- XCTAssertEqual(try sourceContext.count(entityName: "Product"), 1)
- XCTAssertEqual(try sourceContext.count(entityName: "ProductAttribute"), 1)
-
- // Action
- let targetContainer = try migrate(sourceContainer, to: "Model 28")
-
- // Assert
- let targetContext = targetContainer.viewContext
-
- let persistedProduct = try XCTUnwrap(targetContext.first(entityName: "Product"))
- XCTAssertEqual(persistedProduct.value(forKey: "crossSellIDs") as? [Int64], productCrossSellIDs)
- XCTAssertEqual(persistedProduct.value(forKey: "groupedProducts") as? [Int64], groupedProductIDs)
- XCTAssertEqual(persistedProduct.value(forKey: "relatedIDs") as? [Int64], productRelatedIDs)
- XCTAssertEqual(persistedProduct.value(forKey: "upsellIDs") as? [Int64], productUpsellIDs)
- XCTAssertEqual(persistedProduct.value(forKey: "variations") as? [Int64], productVariationIDs)
-
- let persistedAttribute = try XCTUnwrap(targetContext.first(entityName: "ProductAttribute"))
- XCTAssertEqual(persistedAttribute.value(forKey: "options") as? [String], attributeOptions)
- }
-
func test_migrating_from_31_to_32_renames_Attribute_to_GenericAttribute() throws {
// Given
let sourceContainer = try startPersistentContainer("Model 31")
diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt
index b687b52f809..9f77e398a69 100644
--- a/RELEASE-NOTES.txt
+++ b/RELEASE-NOTES.txt
@@ -3,6 +3,7 @@
23.1
-----
+- [internal] Remove oldest (<30) core data models [https://github.com/woocommerce/woocommerce-ios/pull/15987]
- [*] Jetpack setup: Native experience for the connection step [https://github.com/woocommerce/woocommerce-ios/pull/15983]
- [*] Payments: Updated the In-Person Payments `Learn More` redirection to display the correct page based on the selected payment provider [https://github.com/woocommerce/woocommerce-ios/pull/15998]