• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Fixed Data truncated for column 'user_state' at row 888

Affected version
2.0 Beta 2

Alfa1

Well-known member
#1
At upgrade through CLI of XF1.5.14 to XF2:

[XF\Db\Exception]
MySQL query error [1265]: Data truncated for column 'user_state' at row 888

This happened at step 30 upgrade to 2.0.0 Alpha

I run an addon 'Enhanced Registration Moderation' on XF1 that has added additional user states. This may be related.
 

Mike

XenForo developer
Staff member
#2
This is specifically caused by an add-on that changes the definition of our core user_state column. To a degree, this may be required, though any sort of core column edits can be dangerous as it invalidates assumptions of the core code. Doing this may cause unexpected behavior when the add-on is disabled for example.

However, I have made some changes that should prevent this from causing errors during the upgrade. Add-ons that really must edit a core enum column should use the schema manager to add particular values to the enum and remove those values on uninstall (via addValues/removeValues) rather than resetting the value list to what it thinks is the correct value.