From 0f0fcf198ef2a7ee720df0621bd98e44ea68167e Mon Sep 17 00:00:00 2001 From: Nayd Date: Tue, 27 Jan 2015 22:43:45 +0000 Subject: 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 --- sql/updates/characters/2015_01_27_00_characters.sql | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 sql/updates/characters/2015_01_27_00_characters.sql (limited to 'sql/updates/characters') diff --git a/sql/updates/characters/2015_01_27_00_characters.sql b/sql/updates/characters/2015_01_27_00_characters.sql new file mode 100644 index 00000000000..3ccaa4defb0 --- /dev/null +++ b/sql/updates/characters/2015_01_27_00_characters.sql @@ -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`); -- cgit v1.2.3