GUACAMOLE-52: Foreign keys in history table should be ON DELETE SET NULL. For sake of context, always store username and connection name in history table.
This commit is contained in:
1 parent
673fe42631
commit
f4a3c5b31e
7 files changed
+225
-39
No files matched your search
+7
-5
@@ -230,11 +230,13 @@ CREATE TABLE `guacamole_user_permission` (
|
||||
|
||||
CREATE TABLE `guacamole_connection_history` (
|
||||
|
||||
`history_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`user_id` int(11) NOT NULL,
|
||||
`connection_id` int(11) NOT NULL,
|
||||
`start_date` datetime NOT NULL,
|
||||
`end_date` datetime DEFAULT NULL,
|
||||
`history_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`user_id` int(11) DEFAULT NULL,
|
||||
`username` varchar(128) NOT NULL,
|
||||
`connection_id` int(11) DEFAULT NULL,
|
||||
`connection_name` varchar(128) NOT NULL,
|
||||
`start_date` datetime NOT NULL,
|
||||
`end_date` datetime DEFAULT NULL,
|
||||
|
||||
PRIMARY KEY (`history_id`),
|
||||
KEY `user_id` (`user_id`),
|
||||
|
||||
Reference in new issue
Block a user