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

codemode's avatar

PHP artisan migrate not able to identify new migration

Hello, I'm just testing Laravel 5.4 with a very basic app. I just created new migration, and for some reason when i do - php artisan migrate

i see this - [PDOException] SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'users' already exists

It seems it cannot identify that i created a new migration. Any ideas? Thanks.

0 likes
3 replies
cbartlett's avatar

Try "php artisan migrate:refresh", that will roll everything back and rerun your migrations, but be warned you will lose any data, but that's what seeders are for.

Rama6312's avatar

check your database maybe or you can to create the new table and create migration again.

Please or to participate in this conversation.