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

Per-document migration #293

Open
nyarly opened this issue May 28, 2012 · 3 comments
Open

Per-document migration #293

nyarly opened this issue May 28, 2012 · 3 comments

Comments

@nyarly
Copy link

nyarly commented May 28, 2012

I'm not exactly sure how this would work, but a significant feature for any ODM would be the ability to build migrations on a per-document scale.

I think this would amount to some means (akin to _type) of determining the migration level of a document, as well as a DSL for describing how to load old versions of the document. On save, migration to the current version would be complete.

Of concern is multiple persistence clients at different versions, as well as down-migration (I don't recognize this version number...)

@myronmarston
Copy link
Contributor

FWIW, we have a mixin we've been using for this:

https://gist.github.com/2002463

I mentioned this to @seancribbs at one point (thing it might make sense to roll it into ripple) and he was open to the idea. I'm not doing as much with riak/ripple these days, though, so I doubt I'll have the time to do it.

@duff
Copy link
Contributor

duff commented May 29, 2012

For the times when we've needed to do migrations, we've used zd, a gem @ntalbott made. Thought I'd mention it in case you find it useful:

https://github.com/ntalbott/zd

@ntalbott
Copy link
Contributor

Yah, zd is total experiment-ware; I'm favoring an approach more like what @nyarly is proposing going forward. Along those lines, Braintree's strategy is pretty interesting: https://www.braintreepayments.com/braintrust/data-migrations-for-nosql-with-curator

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