drewmccormack / ensembles

A synchronization framework for Core Data.
MIT License
1.63k stars 131 forks source link

CoreData + Ensembles migration issue #291

Closed sacred0x01 closed 4 years ago

sacred0x01 commented 4 years ago

...

drewmccormack commented 4 years ago

With Ensembles, you must add an explicit model version when you change anything. Did you do that?

You can still use lightweight migration, but the old version and the new version must be in the model. You can’t use the really new system where it just figures out the old model.

Kind regards, Drew

On 30 Jul 2020, at 17:54, sacred0x01 notifications@github.com wrote:

 Hi!

We have CoreData powered app + Ensembles. Recently we decided to add two more properties (both Data) and now receive this error (message) when trying to enable sync

Failed to migrate modification events: Error Domain=NSCocoaErrorDomain Code=134000 "Failed to save. Unknown store type, format, or version." <<< -[CDEEventImport main] line 13 CoreData without sync works perfectly - lightweight migration did the trick for new added fields. But when we trying to enable sync

 persistentStoreEnsemble.merge 

got an error. No idea how to fix, but your book has migration section which is poorly covers this topic. Tried to update Ensemble Identifier, deleech, reset icloud and test on fresh install - no luck. So any help would help a lot)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

sacred0x01 commented 4 years ago

Hi, @drewmccormack! Thanks for your answer.

We did all the things, but issue still was on our side. See screenshot We were trying to use transformable type to store array without data wrapper, but received error about NSData archiving and switched to Binary Data type, but xcode decided not to remove previous fields. After hours of debugging your lib i found an issue with json importer and wrong type packing and fix it inside xcode model file.

Also, is it possible to use Transformable somehow with your lib? Because all array-like structure right now we have packed as Data.

drewmccormack commented 4 years ago

I am working on some fixes for transformables. They are in a side branch. You could try that if you like.

Kind regards, Drew

On 31 Jul 2020, at 10:43, sacred0x01 notifications@github.com wrote:

 Hi, @drewmccormack! Thanks for your answer.

We did all the things, but issue still was on our side. See We were trying to use transformable type to store array without data wrapper, but received error about NSData archiving and switched to Binary Data type, but xcode decided not to remove previous fields. After hours of debugging your lib i found an issue with json importer and wrong type packing and fix it inside xcode model file.

Also, is it possible to use Transformable somehow with your lib? Because all array-like structure right now we have packed as Data.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.