From b79787755865c79f1f082c138d2c0575333c5c8a Mon Sep 17 00:00:00 2001 From: Dawnforger Date: Sat, 9 May 2026 00:38:29 -0500 Subject: [PATCH] fix(db_world): ensure attributeMask exists before 2023_07_17_01 update The column was introduced in old/9.x SQL but not in the archive chain; fresh archive-only installs lacked the column. Add idempotent ALTER via INFORMATION_SCHEMA before updating spell_enchant_proc_data. Co-authored-by: Cursor --- data/sql/archive/db_world/2023_07_17_01.sql | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/data/sql/archive/db_world/2023_07_17_01.sql b/data/sql/archive/db_world/2023_07_17_01.sql index 11031be..659cc5f 100644 --- a/data/sql/archive/db_world/2023_07_17_01.sql +++ b/data/sql/archive/db_world/2023_07_17_01.sql @@ -1,3 +1,19 @@ -- DB update 2023_07_17_00 -> 2023_07_17_01 -- +SET @attrmask_exists := ( + SELECT COUNT(*) + FROM INFORMATION_SCHEMA.COLUMNS + WHERE TABLE_SCHEMA = DATABASE() + AND TABLE_NAME = 'spell_enchant_proc_data' + AND COLUMN_NAME = 'attributeMask' +); +SET @sql := IF( + @attrmask_exists > 0, + 'SELECT 1', + 'ALTER TABLE `spell_enchant_proc_data` ADD COLUMN `attributeMask` INT UNSIGNED NOT NULL DEFAULT 0 AFTER `procEx`' +); +PREPARE stmt FROM @sql; +EXECUTE stmt; +DEALLOCATE PREPARE stmt; + UPDATE `spell_enchant_proc_data` SET `attributeMask` = 0x2 WHERE `entry` = 2675;