Note: The default config file action for clients failing the checks can be changed for each check via the characters.warden_action table
Credits to TOM_RUS
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