From 7f22088d5f731a71cfacbef63ce84f2dcdf8ca90 Mon Sep 17 00:00:00 2001 From: Chad Scharf <3904944+cscharf@users.noreply.github.com> Date: Thu, 2 Apr 2020 14:08:19 -0400 Subject: [PATCH] Fix delcaration of @UtcNow variable --- src/Sql/dbo/Stored Procedures/Cipher_Restore.sql | 3 +-- util/Migrator/DbScripts/2020-04-02_00_CipherSoftDelete.sql | 6 ++---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/Sql/dbo/Stored Procedures/Cipher_Restore.sql b/src/Sql/dbo/Stored Procedures/Cipher_Restore.sql index 9480e82f4..ab646b46c 100644 --- a/src/Sql/dbo/Stored Procedures/Cipher_Restore.sql +++ b/src/Sql/dbo/Stored Procedures/Cipher_Restore.sql @@ -23,8 +23,7 @@ BEGIN [Edit] = 1 AND [Id] IN (SELECT * FROM @Ids) - DECLARE @UtcNow DATETIME2(7); - SET @UtcNow = GETUTCDATE(); + DECLARE @UtcNow DATETIME2(7) = GETUTCDATE(); UPDATE [dbo].[Cipher] SET diff --git a/util/Migrator/DbScripts/2020-04-02_00_CipherSoftDelete.sql b/util/Migrator/DbScripts/2020-04-02_00_CipherSoftDelete.sql index 01ec1fb34..af5c1537f 100644 --- a/util/Migrator/DbScripts/2020-04-02_00_CipherSoftDelete.sql +++ b/util/Migrator/DbScripts/2020-04-02_00_CipherSoftDelete.sql @@ -31,8 +31,7 @@ BEGIN [Edit] = 1 AND [Id] IN (SELECT * FROM @Ids) - DECLARE @UtcNow DATETIME2(7); - SET @UtcNow = GETUTCDATE(); + DECLARE @UtcNow DATETIME2(7) = GETUTCDATE(); UPDATE [dbo].[Cipher] SET @@ -99,8 +98,7 @@ BEGIN AND [Id] IN (SELECT * FROM @Ids) -- Delete ciphers - DECLARE @UtcNow DATETIME2(7); - SET @UtcNow = GETUTCDATE(); + DECLARE @UtcNow DATETIME2(7) = GETUTCDATE(); UPDATE [dbo].[Cipher] SET