summaryrefslogtreecommitdiff
path: root/db/update.d/03_Messages.php
diff options
context:
space:
mode:
Diffstat (limited to 'db/update.d/03_Messages.php')
-rw-r--r--db/update.d/03_Messages.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/db/update.d/03_Messages.php b/db/update.d/03_Messages.php
new file mode 100644
index 00000000..4c6ff232
--- /dev/null
+++ b/db/update.d/03_Messages.php
@@ -0,0 +1,14 @@
+<?php
+if(sql_num_query("DESCRIBE `Messages` `id`") === 0) {
+ sql_query("ALTER TABLE `Messages`
+ DROP PRIMARY KEY,
+ ADD `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST
+ ");
+ $applied = true;
+}
+
+_add_index("Messages", array("SUID"));
+_add_index("Messages", array("RUID"));
+_datetime_to_int("Messages", "Datum");
+_add_index("Messages", array("Datum"));
+?>