CLI Improvements
See original GitHub issueIt would be great to have a way to “dry run” a migration to see what would run as well as a flag to print the SQL for a set of migrations.
For example:
$ knex --dry-run migrate:latest
Would migrate <x>
Would migrate <y>
$ knex --dry-run --print-sql migrate:latest
ALTER TABLE ...
DROP TABLE ...
That way you could easily see what would happen, and also export the sql to file for other purposes.
Let me know what you think.
Issue Analytics
- State:
- Created 9 years ago
- Reactions:2
- Comments:5 (4 by maintainers)
Top Results From Across the Web
CLI: improved - Remy Sharp
CLI : improved. ... Over the years my command line habits have improved and I often search for smarter tools for the jobs...
Read more >cli-improved.md - gists · GitHub
CLI Improved. This document lists improvements over the default Linux command line tools. The list was initially motivated by a blog post by...
Read more >Big Improvements Coming to the Salesforce CLI
Today, when you install the Salesforce CLI, you get two interoperable CLIs: one is called sfdx (which is the current version of the...
Read more >CLI: Improved - Hacker News
It leads to a lot of headache as the complexity of the task grows because of the in-band signaling and lack of universal...
Read more >Upcoming Improvements to Salesforce CLI - ASAGARWAL.COM
Salesforce is planning to come up with big improvements in Salesforce CLI. Here is the one liner description of these upcoming improvements.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@kabirbaidhya i am looking forward! have you had any success implementing a dry-run option and showing sql queries without executing them?
Makes sense. I’ll give it a try and will do a PR, can have further discussion on the PR itself.
Also, I agree on separating these features in separate PRs, I’ll try to work on the ability to print plain SQL when dry-run first.