'translatable' => $this->_translatable, 'migrateTranslatable' => $this->_migrateTranslatable,
'preview' => $this->_preview,
'column_type' => $this->_columnType, 'column_move_after' => $this->_columnMoveAfter, 'column_format' => $this->_columnFormat, 'column_width' => 300,
- 'default' => '', 'cast' => $this->_cast, 'column_view_namespace' => $this->_columnViewNamespace, 'searchLogic' => $this->_searchLogic,
+ 'default' => null, 'cast' => $this->_cast, 'column_view_namespace' => $this->_columnViewNamespace, 'searchLogic' => $this->_searchLogic,
'allow_null' => true,
'can' => $this->_can, 'can_write' => $this->_canWrite, 'auth' => $this->_auth,
'database_type' => $this->_databaseType, 'database_unique' => $this->_databaseUnique, 'database_index' => $this->_databaseIndex, 'database_default' => $this->_databaseDefault,
$this->_databaseAttributes
);
- if ($this->getAttribute('database_default') !== null) {
- $attributes['default'] = $this->getAttribute('database_default');
+ $default = $this->getAttribute('database_default') ?? $this->getAttribute('default');
+ if ($default !== null) {
+ $attributes['default']=$default;
}
$table->addColumn($name,