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 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?
After
moving "back in time" by checking out a very early build of my app
with an early version of the managed object model (database description)
installing that app version on the simulator
moving forward to the latest build
I filed a feedback report to Apple and got the answer: this "skipping migration error" console output is normal/expected behaviour.
Case closed for me.