Skip to content

Commit

Permalink
fixes to cipher triggers
Browse files Browse the repository at this point in the history
  • Loading branch information
kspearrin committed Jan 18, 2017
1 parent 143b4cb commit fd431ce
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Sql/dbo/Tables/Cipher.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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]
Expand All @@ -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

0 comments on commit fd431ce

Please sign in to comment.