-
-
Notifications
You must be signed in to change notification settings - Fork 526
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 db:migrate:pending to check for pending migrations, closes #165 #379
Conversation
@golmansax, thanks for your PR! By analyzing the history of the files in this pull request, we identified @sdepold, @Americas and @cusspvz to be potential reviewers. |
} | ||
}).catch(function (err) { | ||
console.error(err); | ||
process.exit(1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
process.exit(255);
?
I wouldn't exit with the same exit code as if it were pending migrations.
expect(stdout).to.contain('createPerson.js'); | ||
done(); | ||
}, { | ||
cli: { exitCode: 1 }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there is an error, this test will pass because errors are exiting with the same exit code as "pending migrations".
@cusspvz Thanks for the fast reply! It looks like an exit code of 1 is used throughout the repo, so I instead changed the pending migration exit code to 3 (wasn't sure what exit code to choose, and 2 is reserved according to http://www.tldp.org/LDP/abs/html/exitcodes.html) You can see the changes in 69391de. Thoughts? |
I've took a time to look the repo and seems it only exits with 1 when it has errors, and with Please note that I'm only an enthusiast/contributor, @sdepold is the admin of this repo. |
If that's the case, then maybe it can always exit 0 by default, and then running |
I like this functionality, but the name is probably not the best. #385 has a better idea, and what I would propose is merging this change in that one. What I propose:
Also, about the exit code, I believe it best to add the |
Yep, that makes sense. Maybe we can put this pull on hold until after #385 is merged, and then I'll update my pull to add onto the |
for me that would be perfect 👍 |
Closing (PR Cleanup), Open new PR if you wish to continue your work |
Fix minor formatting issue in RELEASE doc
Threw together a pull to tackle #165, got tests to pass locally. A good amount of the src and test code was copied from
db:migrate
, so definitely open to feedback!