diff options
| author | Shauren <none@none> | 2010-07-30 15:15:07 +0200 |
|---|---|---|
| committer | Shauren <none@none> | 2010-07-30 15:15:07 +0200 |
| commit | 9bda35c7dff12460cc9702212693911fdfb9d7ca (patch) | |
| tree | cd670a74cc580a0b33b35ab60e1e85d41d62e8ea /sql | |
| parent | 6624da055aab91750966a8f016568782da833923 (diff) | |
Killed the last blob field (corpse)
--HG--
branch : trunk
Diffstat (limited to 'sql')
| -rw-r--r-- | sql/base/characters_database.sql | 10 | ||||
| -rw-r--r-- | sql/updates/9092_characters_corpse.sql | 39 |
2 files changed, 47 insertions, 2 deletions
diff --git a/sql/base/characters_database.sql b/sql/base/characters_database.sql index 07ae8a0359a..f7b0b40ef5b 100644 --- a/sql/base/characters_database.sql +++ b/sql/base/characters_database.sql @@ -1211,7 +1211,13 @@ CREATE TABLE `corpse` ( `zone` int(11) unsigned NOT NULL default '38' COMMENT 'Zone Identifier', `map` int(11) unsigned NOT NULL default '0' COMMENT 'Map Identifier', `phaseMask` smallint(5) unsigned NOT NULL default '1', - `data` longtext, + `displayId` int(10) unsigned NOT NULL default '0', + `itemCache` text NOT NULL AFTER `displayId`, + `bytes1` int(10) unsigned NOT NULL default '0', + `bytes2` int(10) unsigned NOT NULL default '0', + `guild` int(10) unsigned NOT NULL default '0', + `flags` int(10) unsigned NOT NULL default '0', + `dynFlags` int(10) unsigned NOT NULL default '0', `time` bigint(20) unsigned NOT NULL default '0', `corpse_type` tinyint(3) unsigned NOT NULL default '0', `instance` int(11) unsigned NOT NULL default '0', @@ -1720,7 +1726,7 @@ CREATE TABLE `item_instance` ( `enchantments` text NOT NULL, `randomPropertyId` int(11) NOT NULL default '0', `durability` int(10) unsigned NOT NULL default '0', - `playedTime` int(10) unsigned NOT NULL default '0'; + `playedTime` int(10) unsigned NOT NULL default '0', `text` longtext, PRIMARY KEY (`guid`), KEY `idx_owner_guid` (`owner_guid`) diff --git a/sql/updates/9092_characters_corpse.sql b/sql/updates/9092_characters_corpse.sql new file mode 100644 index 00000000000..0a7bfa497b3 --- /dev/null +++ b/sql/updates/9092_characters_corpse.sql @@ -0,0 +1,39 @@ +ALTER TABLE `corpse` + ADD COLUMN `displayId` int(10) unsigned NOT NULL default '0' AFTER `phaseMask`, + ADD COLUMN `itemCache` text NOT NULL AFTER `displayId`, + ADD COLUMN `bytes1` int(10) unsigned NOT NULL default '0' AFTER `itemCache`, + ADD COLUMN `bytes2` int(10) unsigned NOT NULL default '0' AFTER `bytes1`, + ADD COLUMN `guild` int(10) unsigned NOT NULL default '0' AFTER `bytes2`, + ADD COLUMN `flags` int(10) unsigned NOT NULL default '0' AFTER `guild`, + ADD COLUMN `dynFlags` int(10) unsigned NOT NULL default '0' AFTER `flags`; + +UPDATE `corpse` SET +`displayId` = SUBSTRING(`data`, +length(SUBSTRING_INDEX(`data`,' ',10))+2, +length(SUBSTRING_INDEX(`data`,' ',10+1))-length(SUBSTRING_INDEX(data,' ',10))-1), + +`itemCache` = SUBSTRING(`data`, +length(SUBSTRING_INDEX(`data`,' ',11))+2, +length(SUBSTRING_INDEX(`data`,' ',29+1))-length(SUBSTRING_INDEX(data,' ',11))-1), + +`bytes1` = SUBSTRING(`data`, +length(SUBSTRING_INDEX(`data`,' ',30))+2, +length(SUBSTRING_INDEX(`data`,' ',30+1))-length(SUBSTRING_INDEX(data,' ',30))-1), + +`bytes2` = SUBSTRING(`data`, +length(SUBSTRING_INDEX(`data`,' ',31))+2, +length(SUBSTRING_INDEX(`data`,' ',31+1))-length(SUBSTRING_INDEX(data,' ',31))-1), + +`guild` = SUBSTRING(`data`, +length(SUBSTRING_INDEX(`data`,' ',32))+2, +length(SUBSTRING_INDEX(`data`,' ',32+1))-length(SUBSTRING_INDEX(data,' ',32))-1), + +`flags` = SUBSTRING(`data`, +length(SUBSTRING_INDEX(`data`,' ',33))+2, +length(SUBSTRING_INDEX(`data`,' ',33+1))-length(SUBSTRING_INDEX(data,' ',33))-1), + +`dynFlags` = SUBSTRING(`data`, +length(SUBSTRING_INDEX(`data`,' ',34))+2, +length(SUBSTRING_INDEX(`data`,' ',34+1))-length(SUBSTRING_INDEX(data,' ',34))-1); + +ALTER TABLE `corpse` DROP `data`; |
