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

powertech's avatar

Migration = Nothing to Migrate

I encounter this weird issue where I cannot run any migration that has been created on Laravel

Basically What I did is :

  1. Download Laravel via composer
  2. Edit .env for connection to database using user root
  3. Create migration using php artisan make:migration create_table_category
  4. Run php artisan migrate
  5. Result = Migration table create successfully, nothing to migrate. The database only have migrations table with no rows. Even the users table that comes with Laravel did not created in the database

The only way that I can run migration is to run migration command and specify the path completely with filename, but then still I cannot run any migration command like php artisan migrate:reset

This is the environment that I use to run Laravel using XAMPP

  • Laravel 7.24 and Laravel 5.8.38
  • Apache/2.4.39 (Win64)
  • PHP 7.3.7
  • MariaDB 10.3.16
  • Composer 1.10.10

The details can also be found on this StackOverflow question

0 likes
4 replies
GeordieJackson's avatar

Are you connecting to the right database?

Make sure you haven't accidentally put in the name of a DB whose migrations have alrady run.

It might be a simple little thing like that.

powertech's avatar

Yeah already checked that, I thought the same way as you.

Even to make sure I am connected to the right database, I created the table manually then insert dummy data and did a simple query on the controller and the results are correct

powertech's avatar
powertech
OP
Best Answer
Level 1

So I've found the solution. Basically, it's because of the directory of my Laravel Project.

My root project directory path is F:\Indra\Kerja\[1] Personal\Personal profile\web so my migration path is F:\Indra\Kerja\[1] Personal\Personal profile\web\database\migrations

Notice there's folder named [1] Personal, that's the culprit

I renamed my folder to Personal and voila the migration works normally.

You can see detailed answer on my original Stackoverflow question.

1 like

Please or to participate in this conversation.