Ticket #263: Add cascade delete onto parentID constraints.

This commit is contained in:
James Muehlner
2013-08-14 16:06:02 -07:00
parent 386c56840b
commit 28dbd67da6
2 changed files with 4 additions and 4 deletions

View File

@@ -16,7 +16,7 @@ CREATE TABLE `guacamole_connection_group` (
CONSTRAINT `guacamole_connection_group_ibfk_1`
FOREIGN KEY (`parent_id`)
REFERENCES `guacamole_connection_group` (`connection_group_id`)
REFERENCES `guacamole_connection_group` (`connection_group_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
@@ -38,7 +38,7 @@ CREATE TABLE `guacamole_connection` (
CONSTRAINT `guacamole_connection_ibfk_1`
FOREIGN KEY (`parent_id`)
REFERENCES `guacamole_connection_group` (`connection_group_id`)
REFERENCES `guacamole_connection_group` (`connection_group_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

View File

@@ -17,7 +17,7 @@ CREATE TABLE `guacamole_connection_group` (
CONSTRAINT `guacamole_connection_group_ibfk_1`
FOREIGN KEY (`parent_id`)
REFERENCES `guacamole_connection_group` (`connection_group_id`)
REFERENCES `guacamole_connection_group` (`connection_group_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
@@ -33,7 +33,7 @@ ALTER TABLE `guacamole_connection` ADD UNIQUE KEY `connection_name_parent` (`con
ALTER TABLE `guacamole_connection` ADD CONSTRAINT `guacamole_connection_ibfk_1`
FOREIGN KEY (`parent_id`)
REFERENCES `guacamole_connection_group` (`connection_group_id`);
REFERENCES `guacamole_connection_group` (`connection_group_id`) ON DELETE CASCADE;
--
-- Table of connection group permissions. Each group permission grants a user