【发布时间】:2018-05-01 16:49:20
【问题描述】:
在克隆后的新项目中运行 composer install 我有:
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover
[Illuminate\Database\QueryException]
SQLSTATE[42S02]: Base table or view not found: 1146 Table
'cryptoreview.out
going_links' doesn't exist (SQL: select * from `outgoing_links`)
[Doctrine\DBAL\Driver\PDOException]
SQLSTATE[42S02]: Base table or view not found: 1146 Table
'cryptoreview.out
going_links' doesn't exist
[PDOException]
SQLSTATE[42S02]: Base table or view not found: 1146 Table
'cryptoreview.out
going_links' doesn't exist
package:discover 到底想做什么?
我试图修复正在运行的 php artisan migrate 但是:
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'cryptoreview.outgoing_links' doesn't exist (SQL: select * from `outgoing_links`)
这是一个完全阻塞的情况。没有办法继续下去了
【问题讨论】:
-
Laravel 5.5 引入了包发现来自动注册包服务提供者。不知道为什么它试图访问数据库,但它看起来可能是您的迁移问题?如果您尝试运行
php artisan migrate:fresh会发生什么? (注意:fresh) -
运行
migrate:fresh将删除数据库中的所有数据。
标签: php laravel composer-php laravel-artisan