Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add in more migration types #14

Open
gavin-black opened this issue Jul 18, 2013 · 5 comments
Open

Add in more migration types #14

gavin-black opened this issue Jul 18, 2013 · 5 comments

Comments

@gavin-black
Copy link
Member

Currently only a limited subset of migrations are available

@sascha
Copy link
Contributor

sascha commented Jan 26, 2015

What would be the best way to support custom migrations?

The problem that I have is that in order to determine the source model for the migration, I have to get the metadata of the current store via +[NSPersistentStoreCoordinator metadataForPersistentStoreOfType:URL:error:] but that does not support passing an options dictionary (for the passphrase). There seems to be a private method +[NSPersistentStoreCoordinator metadataForPersistentStoreOfType:URL:options:error:], but looking at it with Hopper it seems that it only calls +[NSPersistentStoreCoordinator metadataForPersistentStoreOfType:URL:error:] again.

My suggestion is to save the store's metadata outside of SQLCipher (by writing the serialized metadata to disc for instance). Do you see any security concerns in doing so?

@sedwo
Copy link

sedwo commented Feb 5, 2015

+1 for progressive migration support.

@jasper-ch-chan
Copy link
Contributor

Hello @sascha,
I was wondering if you ever resolved this issue? If so, how did you go about doing so? I am also currently experiencing this problem.

@sascha
Copy link
Contributor

sascha commented May 7, 2015

@jasper-ch-chan: Sorry, I did not. I was able to get around using custom migrations so far and probably won't work on this again until summer. I'm happy to share my results then, but I think writing the metadata to disc is the only way that's with NSPersistentStoreCoordinator's current API.

@jasper-ch-chan
Copy link
Contributor

@sascha Thanks for your response. Please keep me posted should you make any more progress in this matter. I think I'll take a stab at this implementation and see what comes of it. I'll keep you notified if you're interested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants