Borut Flis
Borut Flis

Reputation: 16415

Can't refresh migration in Laravel

I delete a migration file manually. Now I try to run the migrations with:

php artisan migrate:refresh

I get an error:

  [ErrorException]                                                             
  include(C:\xampp\htdocs\NightClubs/database/migrations/2014_10_12_000000_cr  
  eate_users_table.php): failed to open stream: No such file or directory  

This is the name of the migration file that I deleted. What to do?

Upvotes: 2

Views: 1588

Answers (1)

Justin Origin Broadband
Justin Origin Broadband

Reputation: 1530

The schema for migrations records the names of the files run through the artisan migrate command.

Laravel Migration Schema in MySQL Database

If you experience errors after deleting a migration class file, simply delete the record from the migrations table. If you have the liberty, completely dismantle the database and start from scratch.

Upvotes: 3

Related Questions