CoreStore icon indicating copy to clipboard operation
CoreStore copied to clipboard

Progressive migration

Open KrishnaKaira opened this issue 6 years ago • 1 comments

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?

KrishnaKaira avatar Apr 25 '18 07:04 KrishnaKaira

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

JohnEstropia avatar Apr 25 '18 16:04 JohnEstropia