question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

add a dry-run flag to migrate apply command

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
svetlasyrimiscommented, 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.

0reactions
meyvancommented, 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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Add a dry-run flag to commands · Issue #1145 · cli/cli - GitHub
Example: Inadvertently creating test PRs/Issues while testing. Proposed solution. Either: Add a --dryrun flag to commands. OR; Confirm before ...
Read more >
How to implement a “dry run mode” for data imports in Django
In data import processes it's often useful to have a “dry run” ... You can add a --write flag to the command with...
Read more >
Using the --dry -run flag - YouTube
Once the CLI is installed, we can move onto using the -- dry-run flag. Prefer written content or want a text version of...
Read more >
Issue a query dry run | BigQuery - Google Cloud
You can perform a dry run for a query job by using: The --dry_run flag with the query command in the bq command-line...
Read more >
Can I do a dry run of Update-Database in EF 6? - Stack Overflow
You could use Update-Database with a -Script flag to generate a SQL script instead of applying the migration. If you don't specify a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found