When upgrading from an older version of Geeklog and the Spam-X plugin, there are 2 potential places in plugins/spamx/sql/mysql_updates.php where the upgrade may fail.
It's possible that you have multiple entries for value, in which case adding the PRIMARY KEY will fail.
My SQL is a little rusty but it should be possible to check for and silently delete duplicate entries before adding the PRIMARY KEY. Having duplicate entries makes no sense anyway, so this should be fine.
Adding just name as a PRIMARY KEY will almost certainly fail if you have any entries at all, since that column was never meant to be unique.
If possible, I'd check which - if any - PRIMARY KEY exists and only remove it in case it's PRIMARY KEY (name) and leave it alone if it's already PRIMARY KEY (name, value).
When upgrading from an older version of Geeklog and the Spam-X plugin, there are 2 potential places in plugins/spamx/sql/mysql_updates.php where the upgrade may fail.
It's possible that you have multiple entries for
value
, in which case adding the PRIMARY KEY will fail.My SQL is a little rusty but it should be possible to check for and silently delete duplicate entries before adding the PRIMARY KEY. Having duplicate entries makes no sense anyway, so this should be fine.
Adding just
name
as a PRIMARY KEY will almost certainly fail if you have any entries at all, since that column was never meant to be unique.If possible, I'd check which - if any - PRIMARY KEY exists and only remove it in case it's
PRIMARY KEY (name)
and leave it alone if it's alreadyPRIMARY KEY (name, value)
.