1
0
mirror of https://github.com/bitwarden/server.git synced 2025-04-05 05:00:19 -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
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