Files
TrinityCore2/sql/updates/8957_world_disables.sql
Shauren 6a539270ec Added global disable system and moved all disable fields/tables/configs into it
NOTE: instance disables were not converted for new system! if you had some then you need to fix that using new system

--HG--
branch : trunk
2010-07-21 12:14:23 +02:00

29 lines
1006 B
SQL

-- Step 1: prepare table
DROP TABLE IF EXISTS `disables`;
CREATE TABLE `disables` (
`sourceType` int(10) unsigned NOT NULL,
`entry` int(10) unsigned NOT NULL,
`flags` tinyint(3) unsigned NOT NULL default '0',
`comment` varchar(255) character set utf8 NOT NULL default '',
PRIMARY KEY (`sourceType`,`entry`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- Step 2: pull data
-- a) spells
INSERT INTO `disables` SELECT 0,`entry`,`disable_mask`,`comment` FROM `spell_disabled`;
-- b) maps (areatriggers)
-- don't convert
-- c) battlegrounds
INSERT INTO `disables` SELECT 3,`id`,0,'' FROM `battleground_template` WHERE `disable`=1;
-- d) achievement criteria data
INSERT INTO `disables` SELECT 4,`criteria_id`,0,'' FROM `achievement_criteria_data` WHERE `type`=11;
-- Step 3: drop old fields/tables/data
DROP TABLE IF EXISTS `spell_disabled`;
ALTER TABLE `access_requirement` DROP `status`;
ALTER TABLE `battleground_template` DROP `disable`;
DELETE FROM `achievement_criteria_data` WHERE `type`=11;