Laravel:找不到基表或视图:1146 表不存在
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/36333822/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Laravel: Base table or view not found: 1146 Table doesn't exist
提问by nasirkhan
I was following the default documentation and Laracst tutorials to build an application. Here is the source, https://github.com/nasirkhan/laravel-5-starter-application
我遵循默认文档和 Laracst 教程来构建应用程序。这里是源,https://github.com/nasirkhan/laravel-5-starter-application
Installing a new instance form this source shows the following errors, can anyone please assist me to find the issue here?
从该源安装新实例显示以下错误,任何人都可以帮我在这里找到问题吗?
I run the following commands,
我运行以下命令,
git pull [email protected]:nasirkhan/laravel-5-starter-application.git
composer install
then i got the following error.
git pull [email protected]:nasirkhan/laravel-5-starter-application.git
composer install
然后我收到以下错误。
after getting the error i tried to run php artisan migrate
but the error was not resolved.
收到错误后,我尝试运行,php artisan migrate
但错误未解决。
[Illuminate\Database\QueryException] SQLSTATE[42S02]: Base table or view not found: 1146 Table 'laravel-5-starter.permissions' doesn't exist (SQL: select * from `permissions`) [PDOException] SQLSTATE[42S02]: Base table or view not found: 1146 Table 'laravel-5-starter.permissions' doesn't exist Script php artisan clear-compiled handling the post-install-cmd event returned with an error [RuntimeException] Error Output:
回答by Ben Fransen
Run php artisan migrate
from the console. There seems to be a permissions table which is queried but doesn't exist yet.
php artisan migrate
从控制台运行。似乎有一个已查询但尚不存在的权限表。
In the file 2015_09_10_193651_create_roles_tables.php
the table gets created, as you can see here.
在文件中2015_09_10_193651_create_roles_tables.php
,表被创建,你可以在这里看到。