Drop characters data blob. Bit thx to hunuza.

--HG--
branch : trunk
This commit is contained in:
n0n4m3
2010-04-11 11:00:02 +04:00
parent 420496c92a
commit 1dc4f7c745
6 changed files with 164 additions and 192 deletions

View File

@@ -327,7 +327,6 @@ DROP TABLE IF EXISTS `characters`;
CREATE TABLE `characters` (
`guid` int(11) unsigned NOT NULL default '0' COMMENT 'Global Unique Identifier',
`account` int(11) unsigned NOT NULL default '0' COMMENT 'Account Identifier',
`data` longtext,
`name` varchar(12) NOT NULL default '',
`race` tinyint(3) unsigned NOT NULL default '0',
`class` tinyint(3) unsigned NOT NULL default '0',
@@ -385,9 +384,13 @@ CREATE TABLE `characters` (
`power5` int(10) unsigned NOT NULL default'0',
`power6` int(10) unsigned NOT NULL default'0',
`power7` int(10) unsigned NOT NULL default'0',
`latency` int(11) unsigned NOT NULL default '0',
`speccount` tinyint(3) unsigned NOT NULL default 1,
`activespec` tinyint(3) unsigned NOT NULL default 0,
`latency` int(11) unsigned NOT NULL default '0',
`exploredZones` longtext,
`equipmentCache` longtext,
`ammoId` int(10) UNSIGNED NOT NULL default '0',
`knownTitles` longtext,
PRIMARY KEY (`guid`),
KEY `idx_account` (`account`),
KEY `idx_online` (`online`),

View File

@@ -0,0 +1,22 @@
ALTER TABLE characters
ADD COLUMN `exploredZones` longtext AFTER activeSpec,
ADD COLUMN `equipmentCache` longtext AFTER exploredZones,
ADD COLUMN `ammoId` int(10) UNSIGNED NOT NULL default '0' AFTER equipmentCache,
ADD COLUMN `knownTitles` longtext AFTER ammoId;
UPDATE characters SET
exploredZones = SUBSTRING(data,
length(SUBSTRING_INDEX(data, ' ', 1041))+2,
length(SUBSTRING_INDEX(data, ' ', 1168+1))- length(SUBSTRING_INDEX(data, ' ', 1041)) - 1),
equipmentCache = SUBSTRING(data,
length(SUBSTRING_INDEX(data, ' ', 283))+2,
length(SUBSTRING_INDEX(data, ' ', 320+1))- length(SUBSTRING_INDEX(data, ' ', 283)) - 1),
ammoId = SUBSTRING(data,
length(SUBSTRING_INDEX(data, ' ', 1198))+2,
length(SUBSTRING_INDEX(data, ' ', 1198+1))- length(SUBSTRING_INDEX(data, ' ', 1198)) - 1),
knownTitles = SUBSTRING(data,
length(SUBSTRING_INDEX(data, ' ', 626))+2,
length(SUBSTRING_INDEX(data, ' ', 631+1))- length(SUBSTRING_INDEX(data, ' ', 626)) - 1);
ALTER TABLE characters
DROP COLUMN data;