[Bots] Hotfix for possible crash. (#2539)

* [Bots] Hotfix for possible crash.

Possible crash due to 4 nullable columns in `bot_spells_entries` table.

* Update 2022_11_13_bot_spells_entries.sql
This commit is contained in:
Kinglykrab
2022-11-13 20:44:07 -05:00
committed by GitHub
parent 815593b9bc
commit fca99bb274
3 changed files with 12 additions and 1 deletions
@@ -0,0 +1,10 @@
UPDATE bot_spells_entries SET bucket_comparison = 0 WHERE bucket_comparison IS NULL;
UPDATE bot_spells_entries SET min_hp = 0 WHERE min_hp IS NULL;
UPDATE bot_spells_entries SET max_hp = 0 WHERE max_hp IS NULL;
UPDATE bot_spells_entries SET resist_adjust = 0 WHERE resist_adjust IS NULL;
ALTER TABLE `bot_spells_entries`
MODIFY COLUMN `resist_adjust` int(11) NOT NULL DEFAULT 0 AFTER `priority`,
MODIFY COLUMN `min_hp` smallint(5) NOT NULL DEFAULT 0 AFTER `resist_adjust`,
MODIFY COLUMN `max_hp` smallint(5) NOT NULL DEFAULT 0 AFTER `min_hp`,
MODIFY COLUMN `bucket_comparison` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 AFTER `bucket_value`;