DB/Schema: Update characters database

- Change multiple table's chartset from latin1 to utf8
- Add primary keys to tables that didn't have one
- Replaced one unique constraint by primary key
This commit is contained in:
Nayd
2015-01-27 22:43:45 +00:00
parent e5fd47c3ef
commit 0f0fcf198e
2 changed files with 81 additions and 59 deletions

View File

@@ -0,0 +1,17 @@
-- latin1 to utf8
ALTER TABLE `guild_finder_applicant` CONVERT TO CHARACTER SET utf8, CHARACTER SET utf8;
ALTER TABLE `guild_finder_guild_settings` CONVERT TO CHARACTER SET utf8, CHARACTER SET utf8;
ALTER TABLE `item_loot_items` CONVERT TO CHARACTER SET utf8, CHARACTER SET utf8;
ALTER TABLE `item_loot_money` CONVERT TO CHARACTER SET utf8, CHARACTER SET utf8;
ALTER TABLE `pvpstats_battlegrounds` CONVERT TO CHARACTER SET utf8, CHARACTER SET utf8;
ALTER TABLE `pvpstats_players` CONVERT TO CHARACTER SET utf8, CHARACTER SET utf8;
ALTER TABLE `quest_tracker` CONVERT TO CHARACTER SET utf8, CHARACTER SET utf8;
-- add PKs
ALTER TABLE `guild_finder_applicant` DROP INDEX `guildId`, -- had unique instead of PK
ADD PRIMARY KEY (`guildId`, `playerGuid`);
ALTER TABLE `item_loot_items` ADD PRIMARY KEY (`container_id`, `item_id`);
ALTER TABLE `item_loot_money` ADD PRIMARY KEY (`container_id`);
ALTER TABLE `quest_tracker` ADD PRIMARY KEY( `id`, `character_guid`);