Progressive migration #208

Open
opened 2025-12-29 15:26:44 +01:00 by adam · 1 comment
Owner

Originally created by @KrishnaKaira on GitHub (Apr 25, 2018).

Hi,

I have a query, it is not an issue.

I have a live version of the application, and with the new version, I have to add few more attributes to existing entity.
How exactly I can add a progressive migration to the new version.
I am using xcdatamodel class and added the new version to it.

previous code:
fileprivate let dataStack = DataStack(xcodeModelName: "MyDBModel")

Now i am using:
fileprivate let dataStack = DataStack(xcodeModelName: "MyDBModel", bundle: Bundle.main, migrationChain: ["MyDBModel", "MyDBModelV2"])

Will it work? or do I need to change something else too? What is the best practice for progressive migration with core store?

Originally created by @KrishnaKaira on GitHub (Apr 25, 2018). Hi, I have a query, it is not an issue. I have a live version of the application, and with the new version, I have to add few more attributes to existing entity. How exactly I can add a progressive migration to the new version. I am using xcdatamodel class and added the new version to it. previous code: `fileprivate let dataStack = DataStack(xcodeModelName: "MyDBModel")` Now i am using: `fileprivate let dataStack = DataStack(xcodeModelName: "MyDBModel", bundle: Bundle.main, migrationChain: ["MyDBModel", "MyDBModelV2"])` Will it work? or do I need to change something else too? What is the best practice for progressive migration with core store?
adam added the question label 2025-12-29 15:26:44 +01:00
Author
Owner

@JohnEstropia commented on GitHub (Apr 25, 2018):

@KrishnaKaira Are you using xcdatamodeld files? If so, as long as you update your models then it should be good to go.

@JohnEstropia commented on GitHub (Apr 25, 2018): @KrishnaKaira Are you using xcdatamodeld files? If so, as long as you update your models then it should be good to go.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/CoreStore#208