diff options
author | Christian Hofmaier | 2018-03-27 15:07:53 +0200 |
---|---|---|
committer | Christian Hofmaier | 2018-03-27 15:07:53 +0200 |
commit | 9e89edde9bccf632f18ff17fd80f949c491633ba (patch) | |
tree | f1fab4ba31eca795dfee7e2ecf18e84fcf22a06e /modules-available | |
parent | [usb-lock-off] use install.php only once instead of twice to make it work... ... (diff) | |
download | slx-admin-9e89edde9bccf632f18ff17fd80f949c491633ba.tar.gz slx-admin-9e89edde9bccf632f18ff17fd80f949c491633ba.tar.xz slx-admin-9e89edde9bccf632f18ff17fd80f949c491633ba.zip |
[usb-lock-off] use install.php only once without overhead... DONE (for real)
Diffstat (limited to 'modules-available')
-rw-r--r-- | modules-available/usblockoff/install.inc.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/modules-available/usblockoff/install.inc.php b/modules-available/usblockoff/install.inc.php index 31f31003..dda0ac35 100644 --- a/modules-available/usblockoff/install.inc.php +++ b/modules-available/usblockoff/install.inc.php @@ -56,8 +56,10 @@ if ($t4 === UPDATE_DONE) { $res[] = tableAddConstraint("usblockoff_hw", "hwid", "statistic_hw", "hwid", "ON DELETE CASCADE"); // TODO: Works, as the one above already forces retry. How to write it in tableAddConstraint ? -$ret = Database::exec('ALTER TABLE `usblockoff_hw_prop` +if ($t2 === UPDATE_DONE) { + $ret = Database::exec('ALTER TABLE `usblockoff_hw_prop` ADD CONSTRAINT `usblockoff_hw__prop_ibfk_1` FOREIGN KEY (`hwid`, `serial`) REFERENCES `usblockoff_hw` (`hwid`, `serial`) ON DELETE CASCADE'); +} responseFromArray($res); |