summaryrefslogtreecommitdiffstats
path: root/modules-available/locations/install.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules-available/locations/install.inc.php')
-rw-r--r--modules-available/locations/install.inc.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/modules-available/locations/install.inc.php b/modules-available/locations/install.inc.php
index f833568d..d4e1b67b 100644
--- a/modules-available/locations/install.inc.php
+++ b/modules-available/locations/install.inc.php
@@ -30,10 +30,10 @@ $res[] = tableCreate('subnet', '
KEY `locationid` (`locationid`)
');
-// Create response for browser
-
-if (in_array(UPDATE_DONE, $res)) {
- finalResponse(UPDATE_DONE, 'Tables created successfully');
-}
+$res[] = tableAddConstraint('subnet', 'locationid', 'location', 'locationid',
+ 'ON UPDATE CASCADE ON DELETE CASCADE');
+$res[] = tableAddConstraint('setting_location', 'locationid', 'location', 'locationid',
+ 'ON UPDATE CASCADE ON DELETE CASCADE');
-finalResponse(UPDATE_NOOP, 'Everything already up to date');
+// Create response for browser
+responseFromArray($res);