Reputation: 2238
I've run migration for a laravel module by
php artisan module:migrate
Then I wanted a rollback, so I've tried
php artisan module:rollback
There was no such command so I tried
php artisan migrate:rollback
But Laravel doesn't see it:
[Symfony\Component\Debug\Exception\FatalThrowableError]
Class 'AddInteractionsToVisits' not found
Am I doing something wrong? Is there a way to rollback module migration?
Upvotes: 1
Views: 1570
Reputation: 5632
And if you need to rollback specific migration from module you can do this.
php artisan migrate:rollback --path=Modules/YourModule/database/migrations/2020_05_15_xxxxxx_create_your_table.php
I have use this code here instead Module doc code since it's giving an error.
php artisan migrate:rollback --path=...
And remember, If you are using linux servers careful about case sensitivity. You have to add like /Database/Migrations with starting capital.
/Database/Migrations/2020_05_15_xxxxxx_create_your_table.php
Upvotes: 0
Reputation: 2523
Since you're using a package, you should check their docs.
php artisan module:migrate-rollback Module
Check here https://nwidart.com/laravel-modules/v1/advanced-tools/artisan-commands
Upvotes: 3