- Affected version
- 2.2.9
xf_change_log
has the schema;
SQL:
CREATE TABLE `xf_change_log` (
`log_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`content_type` varbinary(25) NOT NULL,
`content_id` int(10) unsigned NOT NULL,
`edit_user_id` int(10) unsigned NOT NULL,
`edit_date` int(10) unsigned NOT NULL,
`field` varchar(100) NOT NULL DEFAULT '',
`old_value` text NOT NULL,
`new_value` text NOT NULL,
`protected` tinyint(3) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (`log_id`),
KEY `edit_date` (`edit_date`),
KEY `content_type_content_id_date` (`content_type`,`content_id`,`edit_date`),
KEY `content_type_date` (`content_type`,`edit_date`)
)
But the entity is lacking required attribute or a default value for
old_value
or new_value
;
PHP:
public static function getStructure(Structure $structure)
{
$structure->table = 'xf_change_log';
$structure->shortName = 'XF:ChangeLog';
$structure->primaryKey = 'log_id';
$structure->columns = [
...
'old_value' => ['type' => self::STR],
'new_value' => ['type' => self::STR],
...
];