mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-07-16 01:26:07 +00:00
Fix HTTP 500 when queuing a 2nd Smithy/Armoury upgrade of the same unit (#173)
This commit is contained in:
+5
-2
@@ -1292,8 +1292,11 @@ CREATE TABLE IF NOT EXISTS `%PREFIX%research` (
|
|||||||
`timestamp` int(11) NULL,
|
`timestamp` int(11) NULL,
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
KEY `vref` (`vref`),
|
KEY `vref` (`vref`),
|
||||||
KEY `timestamp` (`timestamp`),
|
KEY `timestamp` (`timestamp`)
|
||||||
UNIQUE KEY `vref_tech` (`vref`,`tech`)
|
-- NOTE: no UNIQUE(vref,tech) here on purpose. The Smithy/Armoury queue stores
|
||||||
|
-- each queued upgrade of the SAME unit as its own row (same tech, different
|
||||||
|
-- timestamp). A UNIQUE(vref,tech) made the 2nd queued upgrade INSERT fail,
|
||||||
|
-- which under PHP 8 mysqli (exceptions on) became an uncaught HTTP 500.
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
--
|
--
|
||||||
|
|||||||
Reference in New Issue
Block a user