Author: jfthomps
Date: Fri Apr 3 18:37:48 2015
New Revision: 1671122
URL: http://svn.apache.org/r1671122
Log:
VCL-763 - Add missing constraints to database tables
vcl.sql and update-vcl.sql: (last commit was wrong) updated foreign key for
nathostcomputermap.nathostid to be ON DELETE CASCADE ON UPDATE CASCADE
Modified:
vcl/trunk/mysql/update-vcl.sql
vcl/trunk/mysql/vcl.sql
Modified: vcl/trunk/mysql/update-vcl.sql
URL:
http://svn.apache.org/viewvc/vcl/trunk/mysql/update-vcl.sql?rev=1671122&r1=1671121&r2=1671122&view=diff
==============================================================================
--- vcl/trunk/mysql/update-vcl.sql (original)
+++ vcl/trunk/mysql/update-vcl.sql Fri Apr 3 18:37:48 2015
@@ -2069,7 +2069,7 @@ CALL AddConstraintIfNotExists('natlog',
-- Constraints for table `nathostcomputermap`
--
-CALL AddConstraintIfNotExists('nathostcomputermap', 'nathostid', 'nathost',
'id', 'both', 'nullCASCADE');
+CALL AddConstraintIfNotExists('nathostcomputermap', 'nathostid', 'nathost',
'id', 'both', 'CASCADE');
CALL AddConstraintIfNotExists('nathostcomputermap', 'computerid', 'computer',
'id', 'both', 'CASCADE');
-- --------------------------------------------------------
Modified: vcl/trunk/mysql/vcl.sql
URL:
http://svn.apache.org/viewvc/vcl/trunk/mysql/vcl.sql?rev=1671122&r1=1671121&r2=1671122&view=diff
==============================================================================
--- vcl/trunk/mysql/vcl.sql (original)
+++ vcl/trunk/mysql/vcl.sql Fri Apr 3 18:37:48 2015
@@ -2317,7 +2317,7 @@ ALTER TABLE `natlog` ADD CONSTRAINT FORE
--
-- Constraints for table `nathostcomputermap`
--
-ALTER TABLE `nathostcomputermap` ADD CONSTRAINT FOREIGN KEY (`nathostid`)
REFERENCES `nathost` (`id`) ON DELETE SET NULL ON UPDATE CASCADE;
+ALTER TABLE `nathostcomputermap` ADD CONSTRAINT FOREIGN KEY (`nathostid`)
REFERENCES `nathost` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE `nathostcomputermap` ADD CONSTRAINT FOREIGN KEY (`computerid`)
REFERENCES `computer` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
--