From 0629394cec8c86d3babf67232ed12e040bce2b0c Mon Sep 17 00:00:00 2001 From: Addison Beck Date: Wed, 28 Sep 2022 14:46:07 -0400 Subject: [PATCH] [SG-169] Add arguements to AuthRequest_Update.sql (#2313) --- .../Stored Procedures/AuthRequest_Update.sql | 22 ++++++++- .../2022-09-12_01_AuthRequestUpdate.sql | 47 +++++++++++++++++++ 2 files changed, 67 insertions(+), 2 deletions(-) create mode 100644 util/Migrator/DbScripts/2022-09-12_01_AuthRequestUpdate.sql diff --git a/src/Sql/dbo/Stored Procedures/AuthRequest_Update.sql b/src/Sql/dbo/Stored Procedures/AuthRequest_Update.sql index 220a563824..0f29e02736 100644 --- a/src/Sql/dbo/Stored Procedures/AuthRequest_Update.sql +++ b/src/Sql/dbo/Stored Procedures/AuthRequest_Update.sql @@ -1,10 +1,19 @@ CREATE PROCEDURE [dbo].[AuthRequest_Update] @Id UNIQUEIDENTIFIER OUTPUT, + @UserId UNIQUEIDENTIFIER, + @Type SMALLINT, + @RequestDeviceIdentifier NVARCHAR(50), + @RequestDeviceType SMALLINT, + @RequestIpAddress VARCHAR(50), + @RequestFingerprint VARCHAR(MAX), @ResponseDeviceId UNIQUEIDENTIFIER, + @AccessCode VARCHAR(25), + @PublicKey VARCHAR(MAX), @Key VARCHAR(MAX), @MasterPasswordHash VARCHAR(MAX), - @ResponseDate DATETIME2(7), - @AuthenticationDate DATETIME2(7) + @CreationDate DATETIME2 (7), + @ResponseDate DATETIME2 (7), + @AuthenticationDate DATETIME2 (7) AS BEGIN SET NOCOUNT ON @@ -12,9 +21,18 @@ BEGIN UPDATE [dbo].[AuthRequest] SET + [UserId] = @UserId, + [Type] = @Type, + [RequestDeviceIdentifier] = @RequestDeviceIdentifier, + [RequestDeviceType] = @RequestDeviceType, + [RequestIpAddress] = @RequestIpAddress, + [RequestFingerprint] = @RequestFingerprint, [ResponseDeviceId] = @ResponseDeviceId, + [AccessCode] = @AccessCode, + [PublicKey] = @PublicKey, [Key] = @Key, [MasterPasswordHash] = @MasterPasswordHash, + [CreationDate] = @CreationDate, [ResponseDate] = @ResponseDate, [AuthenticationDate] = @AuthenticationDate WHERE diff --git a/util/Migrator/DbScripts/2022-09-12_01_AuthRequestUpdate.sql b/util/Migrator/DbScripts/2022-09-12_01_AuthRequestUpdate.sql new file mode 100644 index 0000000000..ebec22596a --- /dev/null +++ b/util/Migrator/DbScripts/2022-09-12_01_AuthRequestUpdate.sql @@ -0,0 +1,47 @@ +IF OBJECT_ID('[dbo].[AuthRequest_Update]') IS NOT NULL +BEGIN + DROP PROCEDURE [dbo].[AuthRequest_Update] +END +GO + +CREATE PROCEDURE [dbo].[AuthRequest_Update] + @Id UNIQUEIDENTIFIER OUTPUT, + @UserId UNIQUEIDENTIFIER, + @Type SMALLINT, + @RequestDeviceIdentifier NVARCHAR(50), + @RequestDeviceType SMALLINT, + @RequestIpAddress VARCHAR(50), + @RequestFingerprint VARCHAR(MAX), + @ResponseDeviceId UNIQUEIDENTIFIER, + @AccessCode VARCHAR(25), + @PublicKey VARCHAR(MAX), + @Key VARCHAR(MAX), + @MasterPasswordHash VARCHAR(MAX), + @CreationDate DATETIME2 (7), + @ResponseDate DATETIME2 (7), + @AuthenticationDate DATETIME2 (7) +AS +BEGIN + SET NOCOUNT ON + + UPDATE + [dbo].[AuthRequest] + SET + [UserId] = @UserId, + [Type] = @Type, + [RequestDeviceIdentifier] = @RequestDeviceIdentifier, + [RequestDeviceType] = @RequestDeviceType, + [RequestIpAddress] = @RequestIpAddress, + [RequestFingerprint] = @RequestFingerprint, + [ResponseDeviceId] = @ResponseDeviceId, + [AccessCode] = @AccessCode, + [PublicKey] = @PublicKey, + [Key] = @Key, + [MasterPasswordHash] = @MasterPasswordHash, + [CreationDate] = @CreationDate, + [ResponseDate] = @ResponseDate, + [AuthenticationDate] = @AuthenticationDate + WHERE + [Id] = @Id +END +GO