mirror of
https://gitee.com/wonderful-code/buildadmin
synced 2024-11-21 22:55:36 +00:00
fix: MySQL text 和 blob 类型不能有默认值 !132
This commit is contained in:
parent
f063d5dfaf
commit
9daaa178c8
@ -403,7 +403,7 @@ class Helper
|
||||
if (!is_null($phinxTypeData['limit'])) {
|
||||
$phinxColumnOptions['limit'] = $phinxTypeData['limit'];
|
||||
}
|
||||
if ($field['default'] != 'none') {
|
||||
if ($field['default'] != 'none' && !in_array($conciseType, ['text', 'blob'])) {
|
||||
$phinxColumnOptions['default'] = self::analyseFieldDefault($field);
|
||||
}
|
||||
$phinxColumnOptions['null'] = (bool)$field['null'];
|
||||
|
Loading…
Reference in New Issue
Block a user