diff options
Diffstat (limited to 'modules-available/locationinfo/install.inc.php')
-rw-r--r-- | modules-available/locationinfo/install.inc.php | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/modules-available/locationinfo/install.inc.php b/modules-available/locationinfo/install.inc.php new file mode 100644 index 00000000..9cab652a --- /dev/null +++ b/modules-available/locationinfo/install.inc.php @@ -0,0 +1,34 @@ +<?php + +$res = array(); + +// TODO: serverid NULL, constraint to serverlist on delete set NULL +$res[] = tableCreate('locationinfo_locationconfig', ' + `locationid` INT(10) UNSIGNED NOT NULL, + `serverid` INT(11) NOT NULL, + `serverlocationid` VARCHAR(150), + `hidden` BOOLEAN NOT NULL DEFAULT 0, + `openingtime` BLOB, + `config` BLOB, + `calendar` BLOB, + `lastcalendarupdate` INT(11) NOT NULL DEFAULT 0, + PRIMARY KEY (`locationid`) +'); + +// TODO: KEY `servername` (`servername`) +$res[] = tableCreate('locationinfo_coursebackend', ' + `serverid` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, + `servername` VARCHAR(200) NOT NULL, + `servertype` VARCHAR(100) NOT NULL, + `credentials` BLOB, + `error` VARCHAR(1000), + PRIMARY KEY (`serverid`) +'); + +// Create response for browser + +if (in_array(UPDATE_DONE, $res)) { + finalResponse(UPDATE_DONE, 'Tables created successfully'); +} + +finalResponse(UPDATE_NOOP, 'Everything already up to date'); |