Add option to move up or down a set number of migrations
See original GitHub issueWhen testing and debugging migrations, I often want to apply migrations one-at-a-time, checking the changes made by each one. Currently, this requires finding and typing out the timestamp for each migration.
An option like this would simplify this workflow:
$ knex-migrate up --number 1
$ knex-migrate down -n 1
Alternatively, to support just the more common use case of a single migration at a time:
$ knex-migrate up --one
$ knex-migrate down -1
Happy to send in a PR if you think this would be useful.
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (6 by maintainers)
Top Results From Across the Web
Commands - db-migrate - Read the Docs
The down command executes the migrations of your currently configured migrations directory. More specific the down migrations are being called. Down migrations ......
Read more >Code-Based Migration in Entity Framework 6
Add -Migration: Creates a new migration class as per specified name with the Up() and Down() methods. Update-Database: Executes the last migration file ......
Read more >Database: Migrations - The PHP Framework For Web Artisans
A migration class contains two methods: up and down . The up method is used to add new tables, columns, or indexes to...
Read more >Migration Strategies - Types & Best Practices
Create the entire folder hierarchy on the destination, based on what is defined at the source. Migrate only up to 10 items in...
Read more >Writing Migrations - 3.10 - CakePHP Cookbook
When executing this migration, Phinx will create the user_logins table on the way up and ... returns the result as an array }...
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 Free
Top 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

suggesting
--countImplemented and released