Author: arkurth
Date: Tue May 29 17:21:16 2012
New Revision: 1343862

URL: http://svn.apache.org/viewvc?rev=1343862&view=rev
Log:
VCL-450
Removed references to legacy vmware.pm module from SQL files.

Modified:
    incubator/vcl/trunk/mysql/update-vcl.sql
    incubator/vcl/trunk/mysql/vcl.sql

Modified: incubator/vcl/trunk/mysql/update-vcl.sql
URL: 
http://svn.apache.org/viewvc/incubator/vcl/trunk/mysql/update-vcl.sql?rev=1343862&r1=1343861&r2=1343862&view=diff
==============================================================================
--- incubator/vcl/trunk/mysql/update-vcl.sql (original)
+++ incubator/vcl/trunk/mysql/update-vcl.sql Tue May 29 17:21:16 2012
@@ -1201,8 +1201,8 @@ INSERT IGNORE userpriv (usergroupid, pri
 -- Inserts for table `variable`
 --
 
-INSERT IGNORE INTO `variable` (`id`, `name`, `serialization`, `value`) VALUES 
(1, 'schema-version', 'none', '1');
-INSERT IGNORE INTO `variable` (`id`, `name`, `serialization`, `value`) VALUES 
(2, 'timesource|global', 
'none','time.nist.gov,time-a.nist.gov,time-b.nist.gov,time.windows.com');
+INSERT IGNORE INTO `variable` (`name`, `serialization`, `value`) VALUES 
('schema-version', 'none', '1');
+INSERT IGNORE INTO `variable` (`name`, `serialization`, `value`) VALUES 
('timesource|global', 
'none','time.nist.gov,time-a.nist.gov,time-b.nist.gov,time.windows.com');
 INSERT IGNORE INTO `variable` (`name`, `serialization`, `value`) VALUES 
('acknowledgetimeout', 'none', '900');
 INSERT IGNORE INTO `variable` (`name`, `serialization`, `value`) VALUES 
('connecttimeout', 'none', '900');
 
@@ -1333,6 +1333,38 @@ DROP TABLE IF EXISTS `xmlrpcKey`;
 -- --------------------------------------------------------
 
 --
+-- Remove references to legacy vmware.pm provisioning module
+--
+
+UPDATE IGNORE computer, provisioning SET
+computer.provisioningid = (
+  SELECT DISTINCT
+  MIN(provisioning.id)
+  FROM
+  provisioning,
+  module
+  WHERE
+  provisioning.moduleid = (SELECT MIN(module.id) FROM module WHERE 
module.perlpackage = 'VCL::Module::Provisioning::VMware::VMware')
+)
+WHERE provisioning.moduleid IN (SELECT module.id FROM module WHERE 
module.perlpackage = 'VCL::Module::Provisioning::vmware');
+
+UPDATE IGNORE statgraphcache, provisioning SET
+statgraphcache.provisioningid = (
+  SELECT DISTINCT
+  MIN(provisioning.id)
+  FROM
+  provisioning,
+  module
+  WHERE
+  provisioning.moduleid = (SELECT MIN(module.id) FROM module WHERE 
module.perlpackage = 'VCL::Module::Provisioning::VMware::VMware')
+)
+WHERE provisioning.moduleid IN (SELECT module.id FROM module WHERE 
module.perlpackage = 'VCL::Module::Provisioning::vmware');
+
+DELETE FROM provisioning WHERE provisioning.moduleid IN (SELECT module.id FROM 
module WHERE module.perlpackage = 'VCL::Module::Provisioning::vmware');
+
+DELETE FROM module WHERE module.perlpackage = 
'VCL::Module::Provisioning::vmware';
+
+--
 -- Remove Procedures
 --
 

Modified: incubator/vcl/trunk/mysql/vcl.sql
URL: 
http://svn.apache.org/viewvc/incubator/vcl/trunk/mysql/vcl.sql?rev=1343862&r1=1343861&r2=1343862&view=diff
==============================================================================
--- incubator/vcl/trunk/mysql/vcl.sql (original)
+++ incubator/vcl/trunk/mysql/vcl.sql Tue May 29 17:21:16 2012
@@ -194,7 +194,7 @@ CREATE TABLE IF NOT EXISTS `computer` (
   `id` smallint(5) unsigned NOT NULL auto_increment,
   `stateid` tinyint(5) unsigned NOT NULL default '10',
   `ownerid` mediumint(8) unsigned default '1',
-  `platformid` tinyint(3) unsigned NOT NULL default '0',
+  `platformid` tinyint(3) unsigned NOT NULL default '1',
   `scheduleid` tinyint(3) unsigned default NULL,
   `currentimageid` smallint(5) unsigned NOT NULL default '1',
   `nextimageid` smallint(5) unsigned NOT NULL default '1',
@@ -1479,7 +1479,6 @@ INSERT INTO `localauth` (`userid`, `pass
 
 INSERT INTO `module` (`id`, `name`, `prettyname`, `description`, 
`perlpackage`) VALUES 
 (1, 'provisioning_xcat_13', 'xCAT 1.3 Provisioning Module', '', 
'VCL::Module::Provisioning::xCAT'),
-(2, 'provisioning_vmware_1x', 'VMware Server 1.x Provisioning Module', '', 
'VCL::Module::Provisioning::vmware'),
 (3, 'provisioning_lab', 'Computing Lab Provisioning Module', '', 
'VCL::Module::Provisioning::Lab'),
 (4, 'os_windows', 'Windows OS Module', '', 'VCL::Module::OS::Windows'),
 (5, 'os_linux', 'Linux OS Module', '', 'VCL::Module::OS::Linux'),
@@ -1873,10 +1872,11 @@ INSERT INTO `userprivtype` (`id`, `name`
 -- Dumping data for table `variable`
 -- 
 
-INSERT INTO `variable` (`id`, `name`, `serialization`, `value`) VALUES
-(1, 'schema-version', 'none', '1'),
-(2, 'acknowledgetimeout', 'none', '900'),
-(3, 'connecttimeout', 'none', '900');
+INSERT INTO `variable` (`name`, `serialization`, `value`) VALUES
+('schema-version', 'none', '1'),
+('timesource|global', 
'none','time.nist.gov,time-a.nist.gov,time-b.nist.gov,time.windows.com'),
+('acknowledgetimeout', 'none', '900'),
+('connecttimeout', 'none', '900');
 
 -- 
 -- Dumping data for table `vmprofile`


Reply via email to