r5102 do not allow NULL IP allocation type in database
[racktables-incomplete-works] / wwwroot / inc / upgrade.php
index 38f2f40bd8402e26d176bc585fa3d4614c72062f..594823801a262ec22bd41b4140dc8cb45545b643 100644 (file)
@@ -1394,6 +1394,10 @@ CREATE VIEW `RackObject` AS SELECT id, name, label, objtype_id, asset_no, has_pr
                        // change IP address format of IPv4VS and IPv4RS tables
                        convertSLBTablesToBinIPs();
 
+                       // do not allow NULL allocation type
+                       $query[] = "ALTER TABLE `IPv4Allocation` MODIFY `type` enum('regular','shared','virtual','router') NOT NULL DEFAULT 'regular'";
+                       $query[] = "ALTER TABLE `IPv6Allocation` MODIFY `type` enum('regular','shared','virtual','router') NOT NULL DEFAULT 'regular'";
+
                        $query[] = "UPDATE Config SET varvalue = '0.20.0' WHERE varname = 'DB_VERSION'";
                        break;
                case 'dictionary':