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

Data migration strategy #1375

Closed
3 tasks done
philippeluickx opened this issue Aug 9, 2016 · 15 comments
Closed
3 tasks done

Data migration strategy #1375

philippeluickx opened this issue Aug 9, 2016 · 15 comments
Assignees
Milestone

Comments

@philippeluickx
Copy link
Contributor

philippeluickx commented Aug 9, 2016

How do we handle data migrations when moving forward? Do we still make breaking changes? Are migration files needed when changing data models?

Definition of done

  • Options for migration have been studies and the optimal solution has been selected
    • Options are documented in the comments for this issue
  • There is a Meteor or npm package or migration script that handles database migrations
@bajiat
Copy link
Contributor

bajiat commented Aug 10, 2016

Multi-proxy is a prime example of a disruptive, backwards incompatible change on the database level. This is why I am labeling this issue with Multiproxy label.

@jykae
Copy link
Contributor

jykae commented Aug 15, 2016

Option 1: General mongodb-migrations framework, not only for Meteor platform. https://www.npmjs.com/package/mongodb-migrations

Idea is similar like in meteor-migrations package. Plus that this provides CLI tool for running migrations in addition to programmatic approach.

@philippeluickx
Copy link
Contributor Author

@jykae Is there any reason not to take the meteor standard package?

@jykae
Copy link
Contributor

jykae commented Aug 15, 2016

@philippeluickx well, I understood that Meteor is not providing maintained package. They let community to maintain a solution, https://github.com/percolatestudio/meteor-migrations <-- Checkout the beginning of README. That one is option 2, best of Meteor package options, and encouraged by Meteor Guide. We used that but removed away as it caused problems when updating to 1.3.
I think taking general use migration tool is more likely to stand the test of time. Meteor itself is moving to npm just because Node.js/NPM is larger community.

@jykae
Copy link
Contributor

jykae commented Aug 15, 2016

Basically, they are probably trying the same Django was doing years, before they got lots of feedback about missing migration solution & noticed that they must provide maintained solution for that. With this I mean moving from South to Django migrations in 1.7

@philippeluickx
Copy link
Contributor Author

@jykae Good arguments, thanks for sharing. I am ok with mongodb-migrations.

@brylie
Copy link
Contributor

brylie commented Aug 17, 2016

@jykae great work! Lets see what we can do with mongodb-migrations.

@jykae jykae added in progress and removed ready labels Aug 18, 2016
@bajiat
Copy link
Contributor

bajiat commented Aug 18, 2016

@jykae Thanks for the research. I will close this issue and let's discuss concrete steps to take the mongodb-migrations into use,

@bajiat bajiat closed this as completed Aug 18, 2016
@jykae jykae reopened this Aug 18, 2016
@jykae
Copy link
Contributor

jykae commented Aug 18, 2016

@bajiat reopening because had troubles get mongodb-migrations working, percolate:migrations might still be best bet for migrations. And selecting package is not yet strategy imho.

@bajiat
Copy link
Contributor

bajiat commented Aug 19, 2016

@jykae I'm fine with reopening. Please investigate to come up with the best option for database migration.

@jykae
Copy link
Contributor

jykae commented Aug 19, 2016

I propose we take percolate:migrations back. It's easy to use and works also for Meteor 1.4. Example migration for adding isPublic field if it's missing, https://github.com/apinf/api-umbrella-dashboard/pull/1411

Strategy requires also a mutual decision of process how we handle writing of required migration function when a new feature requires it. It should not be one person fight, who manages the version upgrade into production.

@jykae
Copy link
Contributor

jykae commented Aug 23, 2016

percolate:migrations selected for migrations tool. For upcoming bigger migration separate task for tracing how to migrate data & writing migration(s). Left to decide if it's easier to put it 2-3 migration steps or just one heavier. Amount of data is not large in our existing installations.
As for migration strategy after multi-proxy changes, decided that it's good to take writing migration function as part of PR if it does changes for data model/schema

@bajiat I suppose this can be closed now. I add separate task for multiproxy migration.

@philippeluickx
Copy link
Contributor Author

We do need to keep an eye on the percolate:migrations package, in terms of maintenance. Currently there is 1 person who proposed to take ownership, but that might change. We also discussed we can always contribute to the package if needed.

@jykae
Copy link
Contributor

jykae commented Aug 23, 2016

@philippeluickx True, I agree, but with knowledge that we currently have I think percolate:migrations is our best option.

@jykae
Copy link
Contributor

jykae commented Aug 23, 2016

Issue #1436 opened for multiproxy migration, to be done, when schema fields are all designed. I assigned myself. Closing this. I think we have all decisions here now.

@jykae jykae closed this as completed Aug 23, 2016
@jykae jykae removed the in progress label Aug 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants