Deleting migrations results in an Exception

52 views Asked by At

In my Application, when I run php artisan migrate:make create_location_user_table, then delete the generated file (doesn't matter if I delete the line created in vendor/composer/autoload_classmap.php, the php artisan migrate:refresh command throws an error:

include(<path_to_project>/database/migrations/2015_06_21_105357_create_location_user_table.php): failed to open stream: No such file or directory

After running commands to get rid of the faulty autoload entry, I get an exception. The commands I tried are: composer update, composer dump-autoload, php artisan clear-compiled, php artisan optimize.

PHP Fatal error:  Class 'CreateLocationUserTable' not found in <path_to_project>\vendor\laravel\framework\src\Illuminate\Database\Migrations\Migrator.php on line 323

[Symfony\Component\Debug\Exception\FatalErrorException]
Class 'CreateLocationUserTable' not found
1

There are 1 answers

0
Chris Townsend On BEST ANSWER

Go into your mysql database manually (PHPMyAdmin) and remove the migrations table. With the steps you've taken above and doing this should solve your issue