1
0
mirror of https://github.com/bitwarden/server.git synced 2025-04-05 21:18:13 -05:00

fixes to cipher triggers

This commit is contained in:
Kyle Spearrin 2017-01-17 21:11:38 -05:00
parent 143b4cb5ff
commit fd431ceab6

View File

@ -43,10 +43,14 @@ BEGIN
FROM FROM
INSERTED INSERTED
DECLARE @UserId UNIQUEIDENTIFIER = (SELECT TOP 1 [UserId] FROM INSERTED)
UPDATE UPDATE
[User] [User]
SET SET
[AccountRevisionDate] = GETUTCDATE() [AccountRevisionDate] = GETUTCDATE()
WHERE
[Id] = @UserId
END END
GO GO
CREATE TRIGGER [dbo].[Cipher_Updated] CREATE TRIGGER [dbo].[Cipher_Updated]
@ -73,10 +77,14 @@ BEGIN
FROM FROM
INSERTED INSERTED
DECLARE @UserId UNIQUEIDENTIFIER = (SELECT TOP 1 [UserId] FROM INSERTED)
UPDATE UPDATE
[User] [User]
SET SET
[AccountRevisionDate] = GETUTCDATE() [AccountRevisionDate] = GETUTCDATE()
WHERE
[Id] = @UserId
END END
GO GO
CREATE TRIGGER [dbo].[Cipher_Deleted] CREATE TRIGGER [dbo].[Cipher_Deleted]
@ -103,8 +111,12 @@ BEGIN
FROM FROM
DELETED DELETED
DECLARE @UserId UNIQUEIDENTIFIER = (SELECT TOP 1 [UserId] FROM DELETED)
UPDATE UPDATE
[User] [User]
SET SET
[AccountRevisionDate] = GETUTCDATE() [AccountRevisionDate] = GETUTCDATE()
WHERE
[Id] = @UserId
END END