Also rename indexes in recently cleaned tables to have 'idx_' prefix.
Add queries to recreate indexes based on recently modified columns (just to make sure that all indexes are correct).
NOTICE: column can be named `guid` only if it represents character guid. All other guids will be renamed to reflect their purpose (like corpseGuid in this specific case)
* rename columns (remove m_ prefix and convert to lowerCamel case);
* rename prepared statements to conform to standards (there is no CLEAN statement).
* rename table to account_tutorial, because it holds account specific data;
* rename column account to accountId;
* introduce prepared statements for table.
- It is _strongly_ recommended to extensively test the recent changes before applying them to live data
- To fully resync the character db layout with TC releases it is recommended to dump the characters table with
mysqldump --no-data characters > characters_database_livedata.sql
and use a diff tool to compare it against sql/base/characters_database.sql
There is a chance that you will be getting importing errors / data truncation warnings because of ancient invalid pet names.
SELECT * FROM character_pet WHERE CHAR_LENGTH(`name`) > 21;
- MySQL numeric types can NOT be altered in value range or or storage size at all, so things like INT(32) are entirely pointless. As TC currently doesn't use the display width of numeric types, use the default width to avoid confusion. (see MySQL numeric types docs)
- Timestamps can be stored as INT(10) UNSIGNED. As the max value of this type is 4294967295 which translates into year 2106 using it as timestamp we are NOT affected by the year 2038 bug. If the timestamp needs to be negative in some cases, i.e. for displaying infinity using -1, use BIGINT(20) instead.
- Do NOT set ROW_FORMAT for InnoDB tables unless you specifically want COMPRESSED tables (which we don't for performance reasons). MySQL will chose the appropriate ROW_FORMAT by itself depending on the innodb_file_format setting of the server. (FIXED is only available for MyISAM)
- Even though VARCHAR does require less storage space than CHAR for values with variable length, the length still needs to be chosen wisely as this doesn't apply to memory consumption.
- Separate rewarded quests from active quests, and store them in a new table to reduce database size
- Drop the no longer needed `rewarded` column from character_queststatus for smaller table size
- Prevent filling the database with dropped quests
- Delete useless records
- Implement queststatus save "queues" instead of states
- Minor optimizations
WARNING: Backup your database!
--HG--
branch : trunk
As a side effect moved related queries to prepared statements.
As one more side effect fixed not shown and lost mail items in returned expired mail (patch by Quriq14).
--HG--
branch : trunk
*** TO PRESERVE (COPY) THE DATA CONTAINED IN THE OLD TABLES, YOU MUST FOLLOW THE FOLLOWING SQL-RECIPE (REPLACE DATABASENAMES WHERE NEEDED!) ***
-- Move creature_respawn from world to characters db
INSERT INTO `characters`.`creature_respawn` (`guid`, `respawntime`, `instance`)
SELECT `guid, `respawntime` `instance` * FROM `world`.`creature_respawn`;
-- Remove creature_respawn table from world db
DROP TABLE `world`.`creature_respawn`;
-- Move gameobject_respawn from world to characters db
INSERT INTO `characters`.`gameobject_respawn` (`guid`, `respawntime`, `instance`)
SELECT `guid`, `respawntime`, `instance` FROM `world`.`gameobject_respawn`;
-- Remove creature_respawn table from world db
DROP TABLE `world`.`gameobject_respawn`;
-- Move reserved names from world to characters db
INSERT INTO `characters`.`reserved_name` (`name`)
SELECT `name` FROM `world`.`reserved_name`;
-- Remove reserved_names table from world db
DROP TABLE `world`.`reserved_name`;
*** THE ABOVE MUST BE DONE, OR EXISTING INSTANCES WILL BE FULLY RESPAWNED - YOU HAVE BEEN WARNED ***
Closes issue 4842. Closes issue 4849.
--HG--
branch : trunk
* OOP desing and implementation;
* all the queries are moved to prepared statements;
* guild loading is optimized;
* all the possible interaction with guild's data is done inside the guild class;
* added more hooks to GuildScript class;
WARNING: Make sure you backup your characters database before applying this change (just in case).
Known problems with guilds:
* when new member is added to the guild, MOTD is not displayed for him in guild tab of social window;
* if you add item with random property to guild bank visual representation of item below it becomes wrong (it displays wrong stack number);
* packets order differs from official: currently guild bank packet traffic is twice as more than on offy.
--HG--
branch : trunk
Core/Commands: Renamed .ban character to .ban playeraccount (.ban character will ban only the player, not account)
This revision reaches 10000, congratulations and thanks to everyone who contributed!
--HG--
branch : trunk
* Small SQL correction from a previous commit, MySQL doesn't allow default value for a LONGTEXT on Windows, unlinke Linux where it's only a warning
--HG--
branch : trunk
* Extract storage and manipulation of tickets to TicketMgr (from ObjectMgr)
* Extract ticket commands to TicketCommands.cpp
* Adds support for sending GM responses and GM surveys.
* Fix structure of several ticket-related packets.
* Add support for understanding lag reports.
* Thanks Zor for some of the packet structures, and Cyrax for some sniffs
* Please report any issues encountered via the tracker.
--HG--
branch : trunk