summaryrefslogtreecommitdiff
path: root/db/update.d/05_ShiftEntry.php
diff options
context:
space:
mode:
authorJan-Philipp Litza <jplitza@sylar.(none)>2011-12-26 16:04:54 +0100
committerJan-Philipp Litza <jplitza@sylar.(none)>2011-12-26 16:04:54 +0100
commit7154097581f231753005aaabdc12d00173b7ce27 (patch)
tree2fdc6e62e01a8f271c2d249756762e9fd91f7754 /db/update.d/05_ShiftEntry.php
parentbc471460fc8cce0bb9d8b5631e8d57fdec6a3b39 (diff)
database update script
Diffstat (limited to 'db/update.d/05_ShiftEntry.php')
-rw-r--r--db/update.d/05_ShiftEntry.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/db/update.d/05_ShiftEntry.php b/db/update.d/05_ShiftEntry.php
new file mode 100644
index 00000000..3e3a7b6b
--- /dev/null
+++ b/db/update.d/05_ShiftEntry.php
@@ -0,0 +1,9 @@
+<?php
+if(sql_num_query("DESCRIBE `ShiftEntry` `id`") === 0) {
+ sql_query("ALTER TABLE `ShiftEntry` ADD `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST");
+ $applied = true;
+}
+_add_index("ShiftEntry", array("SID"));
+_add_index("ShiftEntry", array("TID"));
+_add_index("ShiftEntry", array("UID"));
+?>