mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-26 03:42:37 +01:00
Killed the last blob field (corpse)
--HG-- branch : trunk
This commit is contained in:
@@ -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`)
|
||||
|
||||
39
sql/updates/9092_characters_corpse.sql
Normal file
39
sql/updates/9092_characters_corpse.sql
Normal file
@@ -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`;
|
||||
Reference in New Issue
Block a user