From fd431ceab6153523ce7906fd3b27c55999a6050e Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Tue, 17 Jan 2017 21:11:38 -0500 Subject: [PATCH] fixes to cipher triggers --- src/Sql/dbo/Tables/Cipher.sql | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/Sql/dbo/Tables/Cipher.sql b/src/Sql/dbo/Tables/Cipher.sql index 52e4784509..719e147b09 100644 --- a/src/Sql/dbo/Tables/Cipher.sql +++ b/src/Sql/dbo/Tables/Cipher.sql @@ -43,10 +43,14 @@ BEGIN FROM INSERTED + DECLARE @UserId UNIQUEIDENTIFIER = (SELECT TOP 1 [UserId] FROM INSERTED) + UPDATE [User] SET [AccountRevisionDate] = GETUTCDATE() + WHERE + [Id] = @UserId END GO CREATE TRIGGER [dbo].[Cipher_Updated] @@ -73,10 +77,14 @@ BEGIN FROM INSERTED + DECLARE @UserId UNIQUEIDENTIFIER = (SELECT TOP 1 [UserId] FROM INSERTED) + UPDATE [User] SET [AccountRevisionDate] = GETUTCDATE() + WHERE + [Id] = @UserId END GO CREATE TRIGGER [dbo].[Cipher_Deleted] @@ -103,8 +111,12 @@ BEGIN FROM DELETED + DECLARE @UserId UNIQUEIDENTIFIER = (SELECT TOP 1 [UserId] FROM DELETED) + UPDATE [User] SET [AccountRevisionDate] = GETUTCDATE() + WHERE + [Id] = @UserId END \ No newline at end of file