I have expanded my CoreData model quite a few times, including renaming entities, properties (and as far as I remember relationships). I am still working in the (CloudKit) development environment, only.
Now I am getting errors each time I start the app (one line out of many shown):
CoreData: debug: CoreData+CloudKit: -PFCloudKitMetadataModelMigrator calculateMigrationStepsWithConnection:error:(404): Skipping migration for 'ANSCKDATABASEMETADATA' because it already has a column named 'ZLASTFETCHDATE'
The app is working as expected, it seems this error has no effect on correct CoreData+CloudKit execution.
But I want to get rid of this error warning before I deploy to production for TestFlight or expand CoreData further. To have a clean CD+CK base I can start migrations from in future.
Can I just reset CD (or CoreData's model) to make CD accept the current model as the base model without any migrations attached to it?
An Apple Engineer suggested here - https://developer.apple.com/forums/thread/47637?answerId=146890022#146890022 to use destroyPersistentStore(at:ofType:options:), but one should be careful to call this method on NSPersistantCoodinator with the same options as when the store has been added. Since the store is created by NSPersistentCloudKitContainer I do not know the options used.
My questions are: Is the above error related to a failed automatic migration? How serious is this error/warning?
Can I get rid of this error by destroying the store? Once only? Then going back to my current NSPersistentCloudKitContainer creation code.
Is there any other suggested way of going forward?
Would a future lightweight migrations solve this error, too?
Thank you in advance for your help!
3
1
2.9k