summaryrefslogtreecommitdiff
path: root/db/update.d/13_User.php
blob: f4da5692133ad3044022023e6432dbb382899ef8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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;
}
?>