如何修复 运行 'php artisan migrate' 命令时的 "Table doesn't exist" error 错误?

How to fix the "Table doesn't exist" error error when running 'php artisan migrate' command?

我有一个项目需要 运行 php artisan migrate。这应该很容易,但我收到一个错误:

php artisan migrate

Illuminate\Database\QueryException

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'skz.master_courses' doesn't exist (SQL: select * from master_courses where date_from > 2021-06-01 and master_courses.deleted_at is null order by date_from asc limit 1)

我不明白select命令从何而来。有人知道它来自哪里吗?

通常在 mysql 中不存在数据库时抛出错误。

但在你的情况下,数据库存在于 mysql server.So 你看起来你的应用程序在任何一个服务提供商 boot() 方法中执行 select 查询

public function boot()
{
          
}

因此您可能需要停止查询执行,直到迁移完成。