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

adds a 'status' command that checks for pending migrations. #30

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

blunckr
Copy link

@blunckr blunckr commented Aug 28, 2021

This adds a new command called 'status', that you run like this: go run example/*.go status. If there are no pending migrations, it will print a message indicating that migrations are up to date, and return nil. If there are pending migrations, it will return an error with the message indicating how many are pending. If things are set up as described in the example dir, this will also cause the program to exit with status 1.

This is useful in deployment, for example, in kubernetes, new pods can use this as a check to determine if they are ready to start receiving traffic.

@blunckr
Copy link
Author

blunckr commented Aug 28, 2021

Oh, I just saw that someone else has already opened a pr that also adds a status command. though it seems like it's intended for a different purpose.

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.

1 participant