在 Lumen 中执行迁移时未设置 table 名称
No table name set on execute migration in Lumen
我在尝试 运行 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 ''
现在我不知道发生了什么。
请注意,未创建的 table 完全控制迁移。
我自己找到了解决方案!
只需在数据库配置数组中添加 table 的名称即可!
'migrations' => 'migrations',
<?php
return [
'default' => 'external',
'migrations' => 'migrations',
'connections' => [
// your connections
],
];
我在尝试 运行 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 ''
现在我不知道发生了什么。
请注意,未创建的 table 完全控制迁移。
我自己找到了解决方案!
只需在数据库配置数组中添加 table 的名称即可!
'migrations' => 'migrations',
<?php
return [
'default' => 'external',
'migrations' => 'migrations',
'connections' => [
// your connections
],
];