Error when trying to rollback a migration
See original GitHub issueEnvironment
Knex version: 0.19.2 Database + version: PostgreSQL 11 OS: macOS Mojave 10.14.6
Bug
-
Explain what kind of behaviour you are getting and how you think it should do Following the steps excatly provided in http://perkframework.com/v1/guides/database-migrations-knex.html I successfully create and run a migration. However, when trying to
knex migrate:rollback
, I get an error unless I prefix the command withnpx
. -
Error message
.spread((batchNo, log) => {
^
TypeError: initKnex(...).migrate.rollback(...).spread is not a function
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (2 by maintainers)
Top Results From Across the Web
php artisan migrate:rollback error - Laracasts
Hello, when i typed command php artisan migrate:rollback i got error, that class does not exist. But it is existing. Copy Code
Read more >Laravel 5.2 php artisan migrate:rollback error - Stack Overflow
I use Laravel 5.2 and I created database tables by running php artisan make:migration create_categories_table --create= ...
Read more >Troubleshooting: Migration Rollback Failed - VMware Docs
For various reasons, your migration rollback might fail. If it fails, perform these troubleshooting steps.
Read more >Roll back error during SfB user migration to Teams
During migration to Teams I had a error message "An unknown error occurred while trying to roll back the user". Read more how...
Read more >Active Record Migrations - Rails Edge Guides
If your migration is irreversible, you should raise ActiveRecord::IrreversibleMigration from your down method. If someone tries to revert your migration, an ...
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
I was getting the same error, but was able to resolve it by upgrading my global reference of knex to the latest version:
npm install -g knex
You may try running
npx knex migrate:rollback
. This should run the latest version of knex CLI.