Undo the actions the migration done on the database. Then look at the migrations table and remove the row relating to the file you deleted.
After that you might then need to run composer dump-autoload
Hi iWader,
Thanks for the response.
What did you mean by "undo the actions the migrations done on the database"? Or rather, how would I go about doing this?
In any event, you were right -- I ended up running "composer dump-autoload" and that seemed to do the trick. My previously deleted database was removed and I was able to successfully run migrate:rollback after that.
Thanks a lot, Matthew
Hi Matthew,
You could do
php artisan migrate:rollback
to revert the state of your database until your database is in the state you want it to be.
I ended up by using dump-autoload. It works for me.
composer dump-autoload
uchsarath said:
I ended up by using dump-autoload. It works for me.
composer dump-autoload
av just run the command php artisan make:migration create_users_table and am getting this error
include(/home/vagrant/www/chatty/vendor/composer/../../database/migrations/ 2014_10_12_000000_create_users_table.php): failed to open stream: No such f ile or directory
can anyone help please?
MartinGacheru said:
av just run the command php artisan make:migration create_users_table and am getting this error
include(/home/vagrant/www/chatty/vendor/composer/../../database/migrations/ 2014_10_12_000000_create_users_table.php): failed to open stream: No such f ile or directory
can anyone help please?
It happens when you manually delete migration .php file. Now you should run composer dump-autoload to get rid of that error and re-run migration creation command.
This solution "composer dump-autoload" helped me as well. Thanks
Delete entry of that migration from "migrations" table in your database and run command php artisan migrate
composer dump-autoload worked after i had deleted a migration file manually.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community