Added 'ineffective' as a success outcome for spying

This commit is contained in:
2019-06-12 16:07:52 +10:00
parent 92dc79f367
commit 451d70eda1
3 changed files with 29 additions and 15 deletions
+13 -11
View File
@@ -1,18 +1,20 @@
#NOTE: ALWAYS, ALWAYS, ALWAYS write a script in revert.sql that undoes these changes
ALTER TABLE
profiles
ADD COLUMN
ladderRank INTEGER UNSIGNED
AFTER
accountId
pastSpying
MODIFY COLUMN
success ENUM ('success', 'failure', 'ineffective')
;
ALTER TABLE
profiles
ADD COLUMN
ladderRankWeight FLOAT UNSIGNED
AFTER
ladderRank
UPDATE
pastSpying
SET
success = 'ineffective'
WHERE
success = 'success'
AND
spoilsGold = 0
AND
(SELECT COUNT(*) FROM equipmentStolen WHERE pastSpyingId = pastSpying.id) = 0
;