Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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>
- Loading branch information
Showing
5 changed files
with
144 additions
and
183 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
d65cf5b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also remove titles bye bye titles :) epic failed :)
d65cf5b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ALTER TABLE characters DROP COLUMN data;
sounds bad.
d65cf5b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will help a lot in web management pages.
d65cf5b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you actually read the commit, you would see that all character data is backed-up. Nothing is actually lost, unless you choose to drop the back-ups it makes. These back-ups are used in the later commit to make titles work again.
d65cf5b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, I cant believe that its already everything in other columns/tables, good work!
d65cf5b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yessssssssssssssss!!!! good work!! more performance to db!!, now if we kill item_instance blob... db will fly!! ^^. Good work devel
d65cf5b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wow kero, i want think, how is possible remove
item_instance
, maybe create a single table like arcemuplayeritems
who store the datacharacter_inventory
&item_instance
, nice change this would be!Cya!
d65cf5b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nanouniko - You know what, i was thinking that a long time ago. Merge both tables into one which could help in managing the items cause they share similar information.
d65cf5b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
item_instance is not only used by character_inventory but also by other tables like mail_items, so you can't merge them into one...
d65cf5b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hunuza - Thanks for the tip.
d65cf5b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wow guys, congrats... a pretty big milestone imo
d65cf5b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so i like to know, how arcemu can?
d65cf5b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know about arcemu, but they probably have a different database design...