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

add a dry-run flag to migrate apply command #3128

Closed
shahidhk opened this issue Oct 14, 2019 · 5 comments
Closed

add a dry-run flag to migrate apply command #3128

shahidhk opened this issue Oct 14, 2019 · 5 comments
Labels
c/cli Related to CLI e/intermediate can be wrapped up in a week good first issue Good for newcomers help wanted Good candidate for contribution. Community help wanted! k/enhancement New feature or improve an existing feature p/medium non-urgent issues/features that are candidates for being included in one of the upcoming sprints

Comments

@shahidhk
Copy link
Member

hasura migrate apply command should have a --dry-run flag, which will just print out the name/versions of the migrations that are going to be applied.
Usage:

# prints out the names of migrations are going to be applied
hasura migrate apply --dry-run
@shahidhk shahidhk added k/enhancement New feature or improve an existing feature help wanted Good candidate for contribution. Community help wanted! good first issue Good for newcomers c/cli Related to CLI p/medium non-urgent issues/features that are candidates for being included in one of the upcoming sprints e/intermediate can be wrapped up in a week hacktoberfest labels Oct 14, 2019
@kabirbaidhya
Copy link

@shahidhk Can I work on this? Please assign it to me if it's available.

Also, it would be helpful if you can provide an example case for this - let's say how do you want the output to look like. Thanks!

@jeremie1112
Copy link

@shahidhk Hi, I am working on this issue if no one is doing it.

@marionschleifer
Copy link
Contributor

I don't think anyone is working on this. If you're interested in taking this up, please follow the contributing wiki 🙂

@svetlasyrimis
Copy link

svetlasyrimis commented Mar 18, 2022

@ashishra0 @shahidhk
what would be even cooler if this command was also attempting to apply the migrations and if it doesn't succeed, rolls transaction back this way you know you have some migration that may cause inconsistency.

@meyvan
Copy link

meyvan commented Sep 6, 2022

@svetlasyrimis mentioned this command should make a transaction, apply all migrations, get the results BUT rollback immediately irrespective of whether they succeed or not. This boosts confidence that whether the migrations work or not

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c/cli Related to CLI e/intermediate can be wrapped up in a week good first issue Good for newcomers help wanted Good candidate for contribution. Community help wanted! k/enhancement New feature or improve an existing feature p/medium non-urgent issues/features that are candidates for being included in one of the upcoming sprints
Projects
None yet
Development

No branches or pull requests

6 participants