0

I find this one so weird, can you point what am I missing?

I run "php artisan migrate" its working well.

When I do this line "php artisan migrate:refresh" or "php artisan migrate:reset" Error below:

enter image description here

so I checked the file 2014_10_12_0000 ... it was not all in my files. I only had this file in my migrations folder: enter image description here

Can you site what am I missing?

Kuya A
  • 351
  • 2
  • 18
  • 2014_10_12_000000_create_users_table is in migration table but not in your directory so you get that result . Please check your migration table in your database – Kiran Subedi Oct 06 '15 at 07:19

2 Answers2

6

Try running composer dumpautoload if you're on Laravel 5+ or php artisan dump-autoload if you're on 4.

Happens to me a lot as well. php artisan migrate only looks at the files but php artisan migrate:rollback or php artisan migrate:refresh looks at your autoloaded files.

Stan Smulders
  • 6,079
  • 1
  • 27
  • 23
0

It seems like you have deleted migration files AFTER you done your first migration.

L5 comes with 2 migration files out of the box to create a user table and a password reset table.

What migrate:refresh does is, it will rollback all migrations that have been migrated (for this you will find a migrations table in your database) and migrate everything again.

Now if you have deleted the create_users migration it doesn't know how to rollback.

If you're resetting anyway you can just delete your whole database (including the migrations table) and run php artisan migrate again.

And remember not to delete your migration files in the future ;)

Tim
  • 5,893
  • 3
  • 35
  • 64