mirror of
https://github.com/EQEmu/Server.git
synced 2026-01-26 16:53:58 +00:00
Moved bot spell entries out of npc spell entries (easier to manage bot changes by committing to non-bot manifest)
This commit is contained in:
parent
d62a449f9c
commit
e3c8b75259
@ -30,7 +30,7 @@
|
||||
Manifest: https://github.com/EQEmu/Server/blob/master/utils/sql/db_update_manifest.txt
|
||||
*/
|
||||
|
||||
#define CURRENT_BINARY_DATABASE_VERSION 9104
|
||||
#define CURRENT_BINARY_DATABASE_VERSION 9105
|
||||
#ifdef BOTS
|
||||
#define CURRENT_BINARY_BOTS_DATABASE_VERSION 9008
|
||||
#else
|
||||
|
||||
@ -358,6 +358,7 @@
|
||||
9102|2017_01_10_book_languages.sql|SHOW COLUMNS FROM `books` LIKE 'language'|empty|
|
||||
9103|2017_01_30_book_languages_fix.sql|SELECT `language` from `books` WHERE `language` IS NULL|not_empty|
|
||||
9104|2017_02_09_npc_spells_entries_type_update.sql|SHOW COLUMNS IN `npc_spells_entries` LIKE `type`|contains|smallint(5) unsigned
|
||||
9105|2017_02_15_bot_spells_entries.sql|SELECT `id` FROM `npc_spells_entries` WHERE `npc_spells_id` >= 701 AND `npc_spells_id` <= 712|not_empty|
|
||||
|
||||
# Upgrade conditions:
|
||||
# This won't be needed after this system is implemented, but it is used database that are not
|
||||
|
||||
31
utils/sql/git/required/2017_02_15_bot_spells_entries.sql
Normal file
31
utils/sql/git/required/2017_02_15_bot_spells_entries.sql
Normal file
@ -0,0 +1,31 @@
|
||||
-- Delete any existing `bots_spells_entries` table
|
||||
DROP TABLE IF EXISTS `bots_spells_entries`;
|
||||
|
||||
-- Create new bot spells entries table (new table does not have spells_id_spellid constraint)
|
||||
CREATE TABLE `bot_spells_entries` (
|
||||
`id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`npc_spells_id` INT(11) NOT NULL DEFAULT '0',
|
||||
`spellid` SMALLINT(5) NOT NULL DEFAULT '0',
|
||||
`type` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`minlevel` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`maxlevel` TINYINT(3) UNSIGNED NOT NULL DEFAULT '255',
|
||||
`manacost` SMALLINT(5) NOT NULL DEFAULT '-1',
|
||||
`recast_delay` INT(11) NOT NULL DEFAULT '-1',
|
||||
`priority` SMALLINT(5) NOT NULL DEFAULT '0',
|
||||
`resist_adjust` INT(11) NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
)
|
||||
COLLATE='latin1_swedish_ci'
|
||||
ENGINE=InnoDB
|
||||
AUTO_INCREMENT=1
|
||||
;
|
||||
|
||||
-- Copy bots spells into new table
|
||||
INSERT INTO `bot_spells_entries` (`npc_spells_id`, `spellid`, `type`, `minlevel`, `maxlevel`, `manacost`, `recast_delay`, `priority`, `resist_adjust`)
|
||||
SELECT `npc_spells_id`, `spellid`, `type`, `minlevel`, `maxlevel`, `manacost`, `recast_delay`, `priority`, `resist_adjust`
|
||||
FROM `npc_spells_entries` WHERE `npc_spells_id` >= '701' AND `npc_spells_id` <= '712';
|
||||
|
||||
-- Delete bot spells from old table
|
||||
DELETE FROM `npc_spells_entries` WHERE `npc_spells_id` >= '701' AND `npc_spells_id` <= '712';
|
||||
|
||||
-- Admins can remove this new table if they are 100% certain they will never use bots
|
||||
Loading…
x
Reference in New Issue
Block a user