fixed 生成表

This commit is contained in:
JaguarJack 2020-05-08 19:21:31 +08:00
parent 6f8552fa70
commit d68891035b
3 changed files with 3 additions and 4 deletions

View File

@ -0,0 +1 @@
<?php

View File

@ -93,6 +93,6 @@ abstract class Factory
{ {
$tables = Db::getConnection()->getTables(); $tables = Db::getConnection()->getTables();
return in_array($table, $tables); return in_array(\config('database.connections.mysql.prefix') . $table, $tables);
} }
} }

View File

@ -36,9 +36,7 @@ class SQL extends Factory
throw new FailedException('table name has lost~'); throw new FailedException('table name has lost~');
} }
$table = \config('database.connections.mysql.prefix') . $params['table']; if ($this->hasTableExists($params['table'])) {
if ($this->hasTableExists($table)) {
throw new FailedException(sprintf('table [%s] has existed', $params['table'])); throw new FailedException(sprintf('table [%s] has existed', $params['table']));
} }