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

Question: Is it possible to disable checksum for steps? #49

Open
j0meinaster opened this issue Oct 25, 2018 · 4 comments
Open

Question: Is it possible to disable checksum for steps? #49

j0meinaster opened this issue Oct 25, 2018 · 4 comments

Comments

@j0meinaster
Copy link

I love mongration and the possibility to run migration scripts.

I currently did some refactoring to my application code and moved some files to a new directory, which are also required in my mongration script. Now the checksum fails, because the require(...) changed.

Is there a way to disable checksum? Or is it a bad idea to require(..) other classes anyway?

The only workaround I know is replacing the checksum in all mongodbs..

@wmartins
Copy link
Member

Hey @j0meinaster, thanks for this issue!

The checksum does a md5 on the file, so, in fact, the checksum was really changed:

StepFile.prototype.read = function(){
this.content = fs.readFileSync(this.path, {encoding : 'utf8'});
this.checksum = md5(this.content);
return this;
}

#41 is a PR that allows us to disable checksum, however, I haven't had time to merge that yet (will look to that in the next days/hours).

@jzwiesler
Copy link

@wmartins What is the status of this PR? I need to replace a migration step in my application an for that either need the possibility to skip an existing migration step or change the checksums.

@j0meinaster
Copy link
Author

I created a new pull request for this issue
#52

@headlessme
Copy link

@wmartins are you still planning to merge one of the available PRs (#41 #52) to disable checksums? We need this functionality to edit some of our older migrations

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