#105441Autogeneration of selectSingle with foreign_table and a custom item with value null tries to create a varchar field
Description
The following auto-generates a varchar(255). I expected it to create an int unsigned DEFAULT NULL. Changing the custom item to 'value' => 0 auto-generates int unsigend NOT NULL DEFAULT 0.
If nullable fields are not desired here by the core, I’d expect that null would be treated for foreign_table-enabled selects implicitly as (int)0, not as varchar. Having a field holding an integer uid extended by an optional null being auto-cast to varchar seems wrong.
'config' => [
'type' => 'select',
'renderType' => 'selectSingle',
'foreign_table' => 'some_foreign_table',
'default' => null,
'items' => [
[
'label' => 'Please choose!',
'value' => null
]
]
]