summaryrefslogtreecommitdiffstats
path: root/modules-available/rebootcontrol/install.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules-available/rebootcontrol/install.inc.php')
-rw-r--r--modules-available/rebootcontrol/install.inc.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/modules-available/rebootcontrol/install.inc.php b/modules-available/rebootcontrol/install.inc.php
index 7d4382d0..008d26aa 100644
--- a/modules-available/rebootcontrol/install.inc.php
+++ b/modules-available/rebootcontrol/install.inc.php
@@ -55,4 +55,13 @@ $output[] = tableAddConstraint('reboot_subnet_x_subnet', 'dstid', 'reboot_subnet
$output[] = tableAddConstraint('reboot_scheduler', 'locationid', 'location', 'locationid',
'ON UPDATE CASCADE ON DELETE CASCADE');
+if (tableExists('reboot_scheduler')) {
+ Database::exec("ALTER TABLE `reboot_scheduler` DROP PRIMARY KEY , ADD PRIMARY KEY (`locationid`)");
+}
+if (tableHasColumn('reboot_scheduler', 'action')) {
+ Database::exec("ALTER TABLE `reboot_scheduler` MODIFY COLUMN `action` ENUM('wol', 'sd', 'rb')");
+}
+
+
+
responseFromArray($output); \ No newline at end of file