Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

egghead77's avatar

nothing to migrate

Please help. I'm going through the laracast tutorials and stuck on episode 7 because php artisan migrate always gives the response "Nothing to Migrate". There's only a migrations table in the database and no users or password reset table which I believe is the default.

If I do php artisan migrate:rollback it says "nothing to rollback" ...I also tried php artisan config:cache to clear the cache. still nothing

just wondering why I dont get the same result as the tutor on the video.

0 likes
14 replies
bobbybouwmann's avatar

Do you have a record in the migrations table? If so there might have been a small hickup. If you run php artisan migrate:fresh it will refresh the full database and run all migrations from scratch.

Let me know if that works for you!

1 like
egghead77's avatar

@BOBBYBOUWMANN - Did that already before. And then typed in php artisan migrate. Still says nothing to migrate.

The migrations table is empty.

update I was able to get the same tables in my database by doing this:

Since php artisan migrate wasnt making the users and passwords reset table automatically (like the tutor's in episode 7 of the laravel 5.7 tutorials) i made the tables individually by typing: php artisan make:migration create_password_resets_table and php artisan make:migration create_users_table.

I went to the database on myphpadmin and reloaded the page to see if those tables were there. They weren't.

So I rolled back by doing php artisan migrate:rollback....

By chance I typed in php artisan migrate again and it worked...i have no idea why it worked.

JohnBraun's avatar

Did you perhaps accidentally delete your migrations, or are they still present in the database/migrations folder?

ajithlal's avatar

could you please check the migration folder inside database folder for migration files

DariusIII's avatar

@EGGHEAD77 - You actually did not have those tables in database/migrations folder and you created them with make:migration commands.

When you create migrations like that, those files have only timestamps(created_at and updated_at) and increment (id) columns created inside.

That is the reason you don't have needed columns that exist in default migration files.

egghead77's avatar

@DARIUSIII - The question is...why did i have to use the make:migration commands. The person in the tutorial only had to type in php artisan migrate and those tables were already automatically in there with the columns already made. That was my original question.

1 like
egghead77's avatar

@JOHNBRAUN - This is what I got:

In the command prompt screen:

C:\Users\BK\Blog>php artisan migrate

Migration table created successfully. Nothing to migrate.

I Checked the following:

The database>migrations folder is empty

The phpMyAdmin database which are referred to in the (.env file, the database.php file and config.php file) upon reload only contains a migrations table. There is no users table or passwords reset table (as is the case in the tutorial).

Cronix's avatar
Cronix
Best Answer
Level 67

You haven't answered the question on whether you have migration files in /database/migrations.

Those are the files that are run when you do php artisan migrate. By default, laravel has a migration in there for creating the users table and password resets table (see https://github.com/laravel/laravel/tree/master/database/migrations )

Laravel will never remove those files. They get run again if you rollback and remigrate, etc. Did you remove them? You should never delete migration files (unless you're not using something).

When you run php artisan make:migration create_password_resets_table that only makes a stub file. It doesn't actually run the migration that would create the table, and it doesn't create the individual fields within the table that auth needs.

If you don't have the 2 original migration files that come with laravel any longer for some reason, you'll need to copy them back. You can use the files I linked to above. Just copy them into /database/migrations. Then delete the migrations table from the db. Then run php artisan migrate. It will recreate the migrations db table, and run the migration files which will create the user/password resets tables with all necessary fields.

egghead77's avatar

@AJITHLAL - The migrations folder is empty. If I type in php artisan migrate -- the migrations folder does not update. it only updates if I use the make:migration commands.

This is literally the first step in episode 7 of the tutorials.

I am using WAMP server. Is that the issue? im literally stuck at episode 7 and unable to move forward cause this migrate command has caused so many issues.

Cronix's avatar

Something is wrong. You need to do what I suggested and copy the two original migration files that come with laravel back into the /database/migrations dir. Somehow you deleted those files, which shouldn't be deleted.

ajithlal's avatar

@EGGHEAD77 - When we install create new laravel peoject there will be two migration files for users table ans password_reset I think. Accidently you deleted the file.

php artisan migrate

Command is used to run the migration. It will rum the new migration that wll be listed inside database/migration folder.

php artisan make:migrate <migration_name> 

Command will helps to create new migration inside database/migration folder.

Please note that the

php artisan make:migrate

Command will only generate the migration file with structure only. You have to manually specify the fields inside the migration.

For now if the database/migrations folder is empty, then download the files listed here (https://github.com/laravel/laravel/tree/master/database/migrations) and paste the files inside your local project ->database->migration folder and run

php artisan migrate

Then you can see two tables with columns on your database.

Continue the tutorial... :)

Cronix's avatar

@egghead77 You're welcome. Laravel has a lot of moving parts, which make it very powerful, but also harder to learn in the beginning. Things will fall into place, just keep it up :)

2 likes

Please or to participate in this conversation.