【发布时间】:2020-06-26 14:38:06
【问题描述】:
我刚刚克隆了一个 Laravel 项目。我尝试运行 composer install 和 php artisan migrate 但都返回此错误
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php 工匠包:发现
在 Connection.php 第 664 行:
SQLSTATE[42S02]: 未找到基表或视图:1146 表 'name.system_functions' 不存在(SQL: select * from
system_functionswherename= test limit 1)在 Connection.php 第 326 行:
SQLSTATE[42S02]:未找到基表或视图:1146 表 'name.system_f
unctions' 不存在
我使用 MySQL,Sequel Pro 已经为这个项目创建了数据库。
Schema::create('system_functions', function (Blueprint $table) {
$table->increments('id');
$table->string('name',64);
$table->integer('group_id')->unsigned();
$table->boolean('is_active');
$table->timestamps();
});
此表中的数据是由数据库播种创建的。我试过 php artisan db:seed 也会返回这个错误。
【问题讨论】:
-
检查您的数据库设置并分享您克隆的项目链接。
-
php artisan config:clear然后再次运行