Doesn’t use easy migration, and dozens of updates will kill performance?

I think that I notice that I should probably keep the entire package of model versions unchanged when sending updates. I'm not sure what will happen if someone has version 1.0 with the data filled in, and then instantly upgrades to version 5.0 without any versions in between. Therefore, migration should also know that this was the first data model. Or maybe it doesn't even work. I do not know.

However, after some changes, I had like 25 data models, where the latter was the current version. So I think that the permanent coordinator of the store will work a lot, iterating over these versions and clarifying the differences, step by step. Isn't it sucking? Is there a workaround?

0
source share
1 answer

If the user moves from version 1 to version 5, Core Data will try to do this in one go.

Core Data does not have the concepts of "version 1" and "version 5", it only understands the source and target models. When a user downloads your “version 1,” Core Data finds the source model in your package. Master data also determines the assignment based on the "current" model. From there, he tries to migrate.

, , MUST , . , .

, , Core Data .

+2

Source: https://habr.com/ru/post/1749905/


All Articles