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

Allow to create split migrations for same version. #47

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ghost
Copy link

@ghost ghost commented Nov 26, 2015

Hi.

Looking for SRP I've changed your package to be able to create two or more migrations for the same version:

Migrations.add({up: function () {run.push('u1-2');}, version: 1});
Migrations.add({up: function () {run.push('u1-1');}, version: 1});

With this you can create migration packages for each service/model that have to be modified.

@zol
Copy link
Member

zol commented Dec 4, 2015

Hey @LoeLobo - Thanks for creating this PR. I'm not going to merge it however as it breaks the mental model that the migrations package is designed with. I'll leave this PR open for a while to give others an opportunity to weigh in.

@ubald
Copy link

ubald commented Feb 16, 2016

I support this idea. In a project made of many packages, I have a "collections" package that provide all the dependencies for other sub packages. This collection package configures meteor-migrations and then the individual packages all define their own migrations. I just have to increment the migration version globally based on the sprint/release number. This way, it is easier to keep track of what was migrated with each release.

If the order operations is important maybe an optional order option could be used to sort migrations from the same version.

@ghost
Copy link
Author

ghost commented Dec 20, 2017

Hi, is it still not possible to create split migrations for the same version?

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

Successfully merging this pull request may close these issues.

3 participants