As designed Incorrect table structure for xf_style_property

Arty

Well-known member
Affected version
2.0.10, 2.1.0
From src/XF/Install/Data/MySql.php:
Code:
		$tables['xf_style_property'] = function(Create $table)
		{
...
			$table->addColumn('property_type', 'varchar', 25);
			$table->addColumn('value_type', 'varchar', 25)->setDefault('');
...
		};
Both columns are varchar(25), but in src/XF/Entity/StyleProperty.php they are enum():
Code:
			'property_type' => ['type' => self::STR, 'required' => true,
				'allowedValues' => ['value', 'css']
			],
			'value_type' => ['type' => self::STR, 'default' => '',
				'allowedValues' => ['', 'string', 'color', 'unit', 'number', 'boolean', 'radio', 'select', 'template']
			],
 
This is intended. There are situations where it can make it easier to modify the allowed values (without having to alter tables).
 
Back
Top Bottom