summaryrefslogtreecommitdiffstats
path: root/modules-available/usblockoff/install.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules-available/usblockoff/install.inc.php')
-rw-r--r--modules-available/usblockoff/install.inc.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/modules-available/usblockoff/install.inc.php b/modules-available/usblockoff/install.inc.php
index cf260c61..47a07573 100644
--- a/modules-available/usblockoff/install.inc.php
+++ b/modules-available/usblockoff/install.inc.php
@@ -16,7 +16,7 @@ $t2 = $res[] = tableCreate('usblockoff_hw_prop', '
PRIMARY KEY (`hwid`, `serial`, `prop`)
');
-$res[] = tableCreate('usb_configs', '
+$t4 = $res[] = tableCreate('usb_configs', '
`configid` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`configname` VARCHAR(200) NOT NULL,
`rulesconfig` VARCHAR(512),
@@ -60,6 +60,11 @@ if ($t1 === UPDATE_DONE || $t2 === UPDATE_DONE) {
$res[] = UPDATE_DONE;
}
+if ($t4 === UPDATE_NOOP) {
+ Database::exec("ALTER TABLE `usb_configs`
+ ADD `configdesc` VARCHAR(200)");
+}
+
if (in_array(UPDATE_DONE, $res)) {
finalResponse(UPDATE_DONE, 'Table created successfully');