summaryrefslogtreecommitdiff
path: root/db/update.d/13_User.php
diff options
context:
space:
mode:
authorPhilip Häusler <msquare@notrademark.de>2011-12-26 16:09:15 +0100
committerPhilip Häusler <msquare@notrademark.de>2011-12-26 16:09:15 +0100
commitd0bb9fbbebf2112b7330476a471c18e06222634b (patch)
treeabc17d687448e1844c0cff3ca953bbf54f17d7be /db/update.d/13_User.php
parent1852a2a1ae190391d47d5ce15398bc0c02c7071b (diff)
parent7154097581f231753005aaabdc12d00173b7ce27 (diff)
Merge branch 'master' of https://vcs.wybt.net/engelsystem/git
Diffstat (limited to 'db/update.d/13_User.php')
-rw-r--r--db/update.d/13_User.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/db/update.d/13_User.php b/db/update.d/13_User.php
new file mode 100644
index 00000000..f4da5692
--- /dev/null
+++ b/db/update.d/13_User.php
@@ -0,0 +1,18 @@
+<?php
+_datetime_to_int("User", "lastLogin");
+
+if(sql_num_query("DESCRIBE `User` `ical_key`") === 0) {
+ sql_query("ALTER TABLE `User` ADD `ical_key` VARCHAR( 32 ) NOT NULL");
+# _add_index("User", array("ical_key"), "UNIQUE");
+# XXX: not everybody has an ical_key, why?
+
+ $applied = true;
+}
+
+$res = sql_select("DESCRIBE `User` `DECT`");
+if($res[0]['Type'] == 'varchar(4)') {
+ sql_query("ALTER TABLE `User` CHANGE `DECT` `DECT` VARCHAR(5) NULL");
+
+ $applied = true;
+}
+?>