mirror of
https://github.com/bitwarden/server.git
synced 2025-04-05 05:00:19 -05:00
[SG-169] Add arguements to AuthRequest_Update.sql (#2313)
This commit is contained in:
parent
65e9520d09
commit
0629394cec
@ -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
|
||||
|
47
util/Migrator/DbScripts/2022-09-12_01_AuthRequestUpdate.sql
Normal file
47
util/Migrator/DbScripts/2022-09-12_01_AuthRequestUpdate.sql
Normal file
@ -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
|
Loading…
x
Reference in New Issue
Block a user