You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@vcl.apache.org by jf...@apache.org on 2014/11/12 21:11:04 UTC

svn commit: r1639027 - /vcl/trunk/mysql/vcl.sql

Author: jfthomps
Date: Wed Nov 12 20:11:03 2014
New Revision: 1639027

URL: http://svn.apache.org/r1639027
Log:
VCL-174 - NAT - support for sites that have small IP address ranges
VCL-706 - Allow a Connect Method to Specify a Port Range or Port List
VCL-655 - Manage groups - create a default or none user group

vcl.sql:
-modified natlog: changed types of fields to make more sense and to match any referenced fields
-added inserts for connectmethodport table
-added 'Default for Editable by' user group to inserts for usergroup table
-added 'Default for Editable by' to groups admin user is member of
-added constraints for nathost, natlog, natmap, and natport

Modified:
    vcl/trunk/mysql/vcl.sql

Modified: vcl/trunk/mysql/vcl.sql
URL: http://svn.apache.org/viewvc/vcl/trunk/mysql/vcl.sql?rev=1639027&r1=1639026&r2=1639027&view=diff
==============================================================================
--- vcl/trunk/mysql/vcl.sql (original)
+++ vcl/trunk/mysql/vcl.sql Wed Nov 12 20:11:03 2014
@@ -656,14 +656,14 @@ CREATE TABLE IF NOT EXISTS `nathost` (
 -- 
 
 CREATE TABLE IF NOT EXISTS `natlog` (
-  `logid` int(11) NOT NULL,
-  `connectmethodportid` int(11) NOT NULL,
-  `nathostid` int(11) NOT NULL,
-  `natIP` int(11) NOT NULL,
-  `computerid` int(11) NOT NULL,
-  `publicport` int(11) NOT NULL,
-  `privateport` int(11) NOT NULL,
-  `protocol` int(11) NOT NULL,
+  `logid` int(10) unsigned NOT NULL,
+  `connectmethodportid` tinyint(3) unsigned default NULL,
+  `nathostid` smallint(5) unsigned default NULL,
+  `natIP` varchar(15) NOT NULL,
+  `computerid` smallint(5) unsigned NOT NULL,
+  `publicport` smallint(5) unsigned NOT NULL,
+  `privateport` smallint(5) unsigned NOT NULL,
+  `protocol` enum('TCP','UDP') NOT NULL,
   KEY `logid` (`logid`),
   KEY `connectmethodportid` (`connectmethodportid`),
   KEY `nathostid` (`nathostid`),
@@ -1555,6 +1555,15 @@ INSERT IGNORE INTO `connectmethodmap` (`
 (2, 1, NULL, NULL, 0, NULL),
 (3, 4, NULL, NULL, 0, NULL);
 
+--
+-- Dumping data for table `connectmethodport`
+--
+
+INSERT INTO `connectmethodport` (`id`, `connectmethodid`, `port`, `protocol`) VALUES
+(1, 1, 22, 'TCP'),
+(2, 2, 3389, 'TCP'),
+(3, 3, 3389, 'TCP');
+
 -- 
 -- Dumping data for table `documentation`
 -- 
@@ -1911,7 +1920,8 @@ INSERT IGNORE INTO `usergroup` (`id`, `n
 (3, 'adminUsers', 1, 1, 1, 1, 0, 480, 600, 180, 50),
 (4, 'manageNewImages', 1, 1, 3, 1, 0, 240, 360, 30, 0),
 (5, 'Specify End Time', 1, 1, 3, 1, 0, 240, 360, 30, 0),
-(6, 'Allow No User Check', 1, 1, 3, 1, 0, 240, 360, 30, 0);
+(6, 'Allow No User Check', 1, 1, 3, 1, 0, 240, 360, 30, 0),
+(7, 'Default for Editable by', 1, 1, 3, 1, 0, 240, 360, 30, 0);
 
 -- 
 -- Dumping data for table `usergroupmembers`
@@ -1922,7 +1932,8 @@ INSERT IGNORE INTO `usergroupmembers` (`
 (1, 3),
 (1, 4),
 (1, 5),
-(1, 6);
+(1, 6),
+(1, 7);
 
 -- 
 -- Dumping data for table `usergroupprivtype`
@@ -2099,7 +2110,7 @@ ALTER TABLE `blockWebTime`
 -- 
 ALTER TABLE `computer`
   ADD CONSTRAINT `computer_ibfk_40` FOREIGN KEY (vmhostid) REFERENCES vmhost (`id`) ON UPDATE CASCADE,
-	ADD CONSTRAINT `computer_ibfk_12` FOREIGN KEY (`ownerid`) REFERENCES `user` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
+  ADD CONSTRAINT `computer_ibfk_12` FOREIGN KEY (`ownerid`) REFERENCES `user` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
   ADD CONSTRAINT `computer_ibfk_30` FOREIGN KEY (`scheduleid`) REFERENCES `schedule` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
   ADD CONSTRAINT `computer_ibfk_33` FOREIGN KEY (`stateid`) REFERENCES `state` (`id`) ON UPDATE CASCADE,
   ADD CONSTRAINT `computer_ibfk_35` FOREIGN KEY (`platformid`) REFERENCES `platform` (`id`) ON UPDATE CASCADE,
@@ -2180,6 +2191,35 @@ ALTER TABLE `managementnode`
   ADD CONSTRAINT `managementnode_ibfk_5` FOREIGN KEY (`stateid`) REFERENCES `state` (`id`) ON UPDATE CASCADE;
 
 -- 
+-- Constraints for table `nathost`
+-- 
+ALTER TABLE `nathost`
+  ADD CONSTRAINT `nathost_ibfk_1` FOREIGN KEY (`resourceid`) REFERENCES `resource` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
+
+-- 
+-- Constraints for table `natlog`
+-- 
+ALTER TABLE `natlog`
+  ADD CONSTRAINT `natlog_ibfk_4` FOREIGN KEY (`computerid`) REFERENCES `computer` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
+  ADD CONSTRAINT `natlog_ibfk_1` FOREIGN KEY (`logid`) REFERENCES `log` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
+  ADD CONSTRAINT `natlog_ibfk_2` FOREIGN KEY (`connectmethodportid`) REFERENCES `connectmethodport` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
+  ADD CONSTRAINT `natlog_ibfk_3` FOREIGN KEY (`nathostid`) REFERENCES `nathost` (`id`) ON DELETE SET NULL ON UPDATE CASCADE;
+
+-- 
+-- Constraints for table `natmap`
+-- 
+ALTER TABLE `natmap`
+  ADD CONSTRAINT `natmap_ibfk_2` FOREIGN KEY (`nathostid`) REFERENCES `nathost` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
+  ADD CONSTRAINT `natmap_ibfk_1` FOREIGN KEY (`computerid`) REFERENCES `computer` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
+
+-- 
+-- Constraints for table `natport`
+-- 
+ALTER TABLE `natport`
+  ADD CONSTRAINT `natport_ibfk_2` FOREIGN KEY (`connectmethodportid`) REFERENCES `connectmethodport` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
+  ADD CONSTRAINT `natport_ibfk_1` FOREIGN KEY (`reservationid`) REFERENCES `reservation` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
+
+-- 
 -- Constraints for table `OS`
 --
 ALTER TABLE `OS`