aboutsummaryrefslogtreecommitdiff
path: root/sql/updates
diff options
context:
space:
mode:
authormegamage <none@none>2009-08-24 20:25:32 -0500
committermegamage <none@none>2009-08-24 20:25:32 -0500
commit4a1a82c5e223ab5fa35ae898783c7771fc73fef4 (patch)
tree4563cf0eadbd406144a12b65d8d6d850df46b06d /sql/updates
parentaa86640fdfef00e1394d4ea3a6febf7f3e7b775c (diff)
[8409] Fixed guild creation date loading, and added another guild loading optimization - last one.
Signed-off-by: Triply <triply@getmangos.com> --HG-- branch : trunk
Diffstat (limited to 'sql/updates')
-rw-r--r--sql/updates/5360_8409_characters_guild.sql17
1 files changed, 17 insertions, 0 deletions
diff --git a/sql/updates/5360_8409_characters_guild.sql b/sql/updates/5360_8409_characters_guild.sql
new file mode 100644
index 00000000000..db517e723b6
--- /dev/null
+++ b/sql/updates/5360_8409_characters_guild.sql
@@ -0,0 +1,17 @@
+-- ALTER TABLE character_db_version CHANGE COLUMN required_8402_02_characters_guild_bank_eventlog required_8409_01_characters_guild bit;
+
+
+-- Change createdate column type from datetime to bigint(20)
+
+-- add temporary column
+ALTER TABLE guild ADD COLUMN created_temp bigint(20) default '0';
+-- update temporary columns data
+UPDATE guild SET created_temp = UNIX_TIMESTAMP(createdate);
+-- drop current column
+ALTER TABLE guild DROP COLUMN createdate;
+-- create new column with correct type
+ALTER TABLE guild ADD COLUMN createdate bigint(20) NOT NULL default '0' AFTER motd;
+-- copy data to new column
+UPDATE guild set createdate = created_temp;
+-- remove old column
+ALTER TABLE guild DROP COLUMN created_temp; \ No newline at end of file