r2599 - considerConfiguredConstraint(): move constraint handling here from trigger_i...
[racktables] / upgrade.php
index bb287a85983dd9d7b30e3a2811172b72907b06cd..ebe7c8ceee56a198323094abf60c2e5c99cf0da7 100644 (file)
@@ -178,7 +178,15 @@ CREATE TABLE `FileLink` (
                        $query[] = "INSERT INTO `Config` (varname, varvalue, vartype, emptyok, is_hidden, description) VALUES ('PREVIEW_TEXT_COLS','80','uint','yes','no','Columns for text file preview')";
                        $query[] = "INSERT INTO `Config` (varname, varvalue, vartype, emptyok, is_hidden, description) VALUES ('PREVIEW_IMAGE_MAXPXS','320','uint','yes','no','Max pixels per axis for image file preview')";
                        $query[] = "INSERT INTO `Config` (varname, varvalue, vartype, emptyok, is_hidden, description) VALUES ('VENDOR_SIEVE','','string','yes','no','Vendor sieve configuration')";
-                       $query[] = "INSERT INTO `Config` (varname, varvalue, vartype, emptyok, is_hidden, description) VALUES ('IPV4LB_LISTSRC','','string','yes','no','IPv4 LBs list source')";
+                       $query[] = "INSERT INTO `Config` (varname, varvalue, vartype, emptyok, is_hidden, description) VALUES ('IPV4LB_LISTSRC','{$objtype_4}','string','yes','no','List source: IPv4 load balancers')";
+                       $query[] = "INSERT INTO `Config` (varname, varvalue, vartype, emptyok, is_hidden, description) VALUES ('IPV4OBJ_LISTSRC','{$objtype_4} or {$objtype_7} or {$objtype_8} or {$objtype_12} or {$objtype_445} or {$objtype_447}','string','yes','no','List source: IPv4-enabled objects')";
+                       $query[] = "INSERT INTO `Config` (varname, varvalue, vartype, emptyok, is_hidden, description) VALUES ('IPV4NAT_LISTSRC','{$objtype_4} or {$objtype_7} or {$objtype_8}','string','yes','no','List source: IPv4 NAT performers')";
+                       $query[] = "INSERT INTO `Config` (varname, varvalue, vartype, emptyok, is_hidden, description) VALUES ('ASSETWARN_LISTSRC','{$objtype_4} or {$objtype_7} or {$objtype_8}','string','yes','no','List source: object, for which asset tag should be set')";
+                       $query[] = "INSERT INTO `Config` (varname, varvalue, vartype, emptyok, is_hidden, description) VALUES ('NAMEWARN_LISTSRC','{$objtype_4} or {$objtype_7} or {$objtype_8}','string','yes','no','List source: object, for which common name should be set')";
+                       $query[] = "delete from Config where varname = 'NAMEFUL_OBJTYPES'";
+                       $query[] = "delete from Config where varname = 'REQUIRE_ASSET_TAG_FOR'";
+                       $query[] = "delete from Config where varname = 'IPV4_PERFORMERS'";
+                       $query[] = "delete from Config where varname = 'NATV4_PERFORMERS'";
                        $query[] = "alter table TagTree add column valid_realm set('file','ipv4net','ipv4vs','ipv4rspool','object','rack','user') not null default 'file,ipv4net,ipv4vs,ipv4rspool,object,rack,user' after parent_id";
                        $result = $dbxlink->query ("select user_id, user_name, user_realname from UserAccount where user_enabled = 'no'");
                        while ($row = $result->fetch (PDO::FETCH_ASSOC))