aboutsummaryrefslogtreecommitdiff
path: root/sql/updates/characters
diff options
context:
space:
mode:
authorNayd <dnpd.dd@gmail.com>2015-01-27 22:43:45 +0000
committerNayd <dnpd.dd@gmail.com>2015-01-27 22:43:45 +0000
commit0f0fcf198ef2a7ee720df0621bd98e44ea68167e (patch)
tree52e8f77fa23daf6bc7e4f323de405a1281615c5e /sql/updates/characters
parente5fd47c3efad299dcd739ceeeb280ca6263ec29a (diff)
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
Diffstat (limited to 'sql/updates/characters')
-rw-r--r--sql/updates/characters/2015_01_27_00_characters.sql17
1 files changed, 17 insertions, 0 deletions
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`);