尝试在Lumen Framework中运行迁移时,我遇到此错误:
$ php artisan migrate:install
[Illuminate\Database\QueryException]
SQLSTATE[42000]: Syntax error or access violation: 1103 Incorrect table name '' (SQL: create table ``
(`migration` varchar(255) not null, `batch` int not null) default character set utf8 collate utf8_unicode_ci)
[PDOException]
SQLSTATE[42000]: Syntax error or access violation: 1103 Incorrect table name ''
Run Code Online (Sandbox Code Playgroud)
现在我不知道发生了什么.
请注意,未创建的表是完全控制迁移的表.
hen*_*ale 27
我自己找到了解决方案!
只需在数据库配置数组中添加表的名称即可完成!
'migrations' => 'migrations',
小智 6
<?php
return [
'default' => 'external',
'migrations' => 'migrations',
'connections' => [
// your connections
],
];
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2182 次 |
| 最近记录: |