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

gustavojnt's avatar

php artisan migrate: Base table or view not found

hi guys sorry , I am newbie in laravel, help me.

this message appears when i type php artisan migrate

[Illuminate\Database\QueryException] SQLSTATE[42S02]: Base table or view not found: 1146 Table 'api_prominas.pm_avaliacao_inscricao_status' doe sn't exist (SQL: alter table pm_avaliacao_inscricao_status add id int unsigned not null auto_increment primary key, add nome varchar(55) not null)

[PDOException] SQLSTATE[42S02]: Base table or view not found: 1146 Table 'api_prominas.pm_avaliacao_inscricao_status' doe sn't exist

already tried, composer dump-autoload.

0 likes
2 replies
aivis's avatar
aivis
Best Answer
Level 14

Check your migration file, maybe you are using Schema::table, like this:

Schema::table('table_name', function ($table)  {
    // ...
});

If you want to create a new table you must use Schema::create:

Schema::create('table_name', function ($table)  {
    // ...
});

See the Laravel migration documentation for more information.

If you are using Schema::create then please provide the contents of your migration file.

9 likes

Please or to participate in this conversation.