字段类型调整

This commit is contained in:
liaofei 2023-05-11 16:53:56 +08:00
parent 8e9cc52831
commit 5178fca71a

View File

@ -811,6 +811,10 @@ class SystemCrudServices extends BaseServices
if (in_array($fieldType, ['text', 'longtext', 'tinytext'])) {
unset($option['limit']);
}
//判断字段类型
if ($fieldType == 'boolean' && isset($option['default']) && $option['default'] === '') {
unset($option['default']);
}
$table->addColumn($item['field'], $this->changeTabelRule($item['field_type']), $option);
}
}