diff --git a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-sqlserver/schema/001-create-schema.sql b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-sqlserver/schema/001-create-schema.sql index be955ac47..da63f609c 100644 --- a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-sqlserver/schema/001-create-schema.sql +++ b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-sqlserver/schema/001-create-schema.sql @@ -559,6 +559,9 @@ CREATE TRIGGER [guacamole_delete_user] INSTEAD OF DELETE AS BEGIN + -- Do not take trigger into account when producing row counts for the DELETE + SET NOCOUNT ON; + -- Delete all associated permissions not covered by ON DELETE CASCADE DELETE FROM [guacamole_user_permission] WHERE @@ -583,6 +586,9 @@ CREATE TRIGGER [guacamole_delete_connection] INSTEAD OF DELETE AS BEGIN + -- Do not take trigger into account when producing row counts for the DELETE + SET NOCOUNT ON; + -- Delete associated sharing profiles DELETE FROM [guacamole_sharing_profile] WHERE [primary_connection_id] IN (SELECT [connection_id] FROM DELETED); @@ -605,6 +611,9 @@ CREATE TRIGGER [guacamole_delete_connection_group] INSTEAD OF DELETE AS BEGIN + -- Do not take trigger into account when producing row counts for the DELETE + SET NOCOUNT ON; + -- Delete all requested connection groups, including descendants WITH [connection_groups] ([connection_group_id]) AS ( SELECT [connection_group_id] FROM DELETED @@ -637,6 +646,9 @@ CREATE TRIGGER [guacamole_delete_sharing_profile] INSTEAD OF DELETE AS BEGIN + -- Do not take trigger into account when producing row counts for the DELETE + SET NOCOUNT ON; + -- Delete all associated permissions not covered by ON DELETE CASCADE UPDATE [guacamole_connection_history] SET [sharing_profile_id] = NULL