I\'m getting the following error
#1690 - BIGINT UNSIGNED value is out of range in \'(
legends.spawns.quantity-
I had similar problem, This error also come if our column have 0 value and we try to update it with -1 value.
In my case MySQL query were Failing if column1 is already have value 0, i.e column1 = 0
For example:
UPDATE `table1` SET `column1` = `column1` - 1 WHERE `column2` = XYZ
This give error
BIGINT UNSIGNED value is out of range in ....
To counter this problem
UPDATE `table1`
SET `column1` = (
CASE WHEN `column1` < 1
THEN 0
ELSE (`column1` - 1)
end)
WHERE `column2` = 1
LIMIT 1