Can't fix Invalid use of NULL value upon upgrade

Affected version
2.0.0

NixFifty

Well-known member
Code:
Running upgrade to 2.0.0 Alpha, step 1... done.
Running upgrade to 2.0.0 Alpha, step 2... done.
Running upgrade to 2.0.0 Alpha, step 3... done.
Running upgrade to 2.0.0 Alpha, step 4... done.
Running upgrade to 2.0.0 Alpha, step 5... done.
Running upgrade to 2.0.0 Alpha, step 6... done.
Running upgrade to 2.0.0 Alpha, step 7... done.
Running upgrade to 2.0.0 Alpha, step 8...
                                                      
  [XF\Db\Exception]                                   
  MySQL query error [1138]: Invalid use of NULL value
 

Chris D

XenForo developer
Staff member
Does your xf_conversation_message table already have a like_users field, perhaps from another add-on?
 

NixFifty

Well-known member
That would explain it. Thought I'd made sure table-wise everything was sound but apparently missed that one. :D

Thanks!
 

Mike

XenForo developer
Staff member
Just to clarify, was this from an add-on, or were you doing some manual table manipulations?
 

NixFifty

Well-known member
Just to clarify, was this from an add-on, or were you doing some manual table manipulations?
From an add-on. I thought I'd checked beforehand to make sure there weren't going to be any column name clashes but i'd missed the xf_conversation_message table so mistakenly thought it was a core issue. :)
 

Chris D

XenForo developer
Staff member
Which add-on was it? I kind of assumed Conversation essentials but I guess it might not be.
 
Reactions: Xon

Floyd R Turbo

Well-known member
So if we have this addon, what has to be done prior to attempting an upgrade? Just removing the addon, or does a table have to be edited / column deleted?
 

Chris D

XenForo developer
Staff member
Looks like it will be a simple case of upgrading it to a soon to be released version before carrying out the upgrade.
 
Reactions: Xon

NixFifty

Well-known member
So if we have this addon, what has to be done prior to attempting an upgrade? Just removing the addon, or does a table have to be edited / column deleted?
There'll probably be an update out for it which will rename the conflicting column name for XF1 users, most likely.
 

NixFifty

Well-known member
googles "pull request" :rolleyes:
Most of Xon's add-ons are open source and available in code repositories for anyone to download and anyone to contribute back.

A pull request is when someone proposes changes to a repository (i.e. contributing fixes or features for an add-on).
 
Reactions: Xon

Xon

Well-known member
I was using "`like_users` blob DEFAULT NULL," so disabling the add-on doesn't break XF1 conversations. I guess I'll just rename it away, and in the XF2 version drop those columns.
 
Reactions: ENF

Chris D

XenForo developer
Staff member
Just never use unprefixed tables or columns. They’re not fun come upgrade time.
 

Xon

Well-known member
Just never use unprefixed tables or columns. They’re not fun come upgrade time.
I do that now, but this was one of my first add-ons. I think I've got a fix for it done, just need to test the upgrade process to make sure I got it :)

(restoring a 6gb gz compressed sql file to my dev environment is paaaainful)
 
Top