修改SQL生成
This commit is contained in:
parent
9e5bbeae5a
commit
635f3e00d0
@ -12,7 +12,6 @@ class SQL extends Factory
|
||||
|
||||
public function done($params)
|
||||
{
|
||||
//dd($this->createSQL($params));
|
||||
Db::execute($this->createSQL($params));
|
||||
|
||||
// 判断表是否创建成功
|
||||
@ -92,8 +91,7 @@ class SQL extends Factory
|
||||
|
||||
return implode(' ', [
|
||||
sprintf('`%s`', $sql['field']),
|
||||
$sql['type'],
|
||||
$sql['length'] ? sprintf('(%s)', $sql['length']) : '',
|
||||
$sql['type'] . ($sql['length'] ? sprintf('(%s)', $sql['length']) : ''),
|
||||
$sql['unsigned'] ? 'unsigned' : '',
|
||||
'default ' . $sql['default'],
|
||||
$sql['nullable'] ? 'not null' : '',
|
||||
|
Loading…
x
Reference in New Issue
Block a user