mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
Remove character data blob.
Update will create backup in data_backup table, just in case... You can drop this when you think you don't need it anymore. (I would recommend you to keep it for a few days/weeks) Signed-off-by: hunuza <hunuza@gmail.com>
This commit is contained in:
parent
4d4f3ae4a2
commit
e7e97a13e0
5 changed files with 144 additions and 183 deletions
|
|
@ -193,7 +193,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',
|
||||
|
|
@ -252,6 +251,9 @@ CREATE TABLE `characters` (
|
|||
`power7` int(10) UNSIGNED NOT NULL default '0',
|
||||
`specCount` tinyint(3) UNSIGNED NOT NULL default '1',
|
||||
`activeSpec` tinyint(3) UNSIGNED NOT NULL default '0',
|
||||
`exploredZones` longtext,
|
||||
`equipmentCache` longtext,
|
||||
`ammoId` int(10) UNSIGNED NOT NULL default '0',
|
||||
PRIMARY KEY (`guid`),
|
||||
KEY `idx_account` (`account`),
|
||||
KEY `idx_online` (`online`),
|
||||
|
|
|
|||
27
sql/updates/9999_01_characters_characters.sql
Normal file
27
sql/updates/9999_01_characters_characters.sql
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
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;
|
||||
|
||||
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);
|
||||
|
||||
CREATE TABLE `data_backup` (
|
||||
`guid` int(11) unsigned NOT NULL default '0' COMMENT 'Global Unique Identifier',
|
||||
`data` longtext,
|
||||
PRIMARY KEY (`guid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
INSERT INTO data_backup (guid, data) (SELECT guid, data FROM characters);
|
||||
|
||||
|
||||
ALTER TABLE characters
|
||||
DROP COLUMN data;
|
||||
Loading…
Add table
Add a link
Reference in a new issue