mirror of
https://github.com/bitwarden/server
synced 2025-12-13 14:53:34 +00:00
Add create SP
This commit is contained in:
@@ -0,0 +1,33 @@
|
|||||||
|
CREATE PROCEDURE [dbo].[UserSignatureKeyPair_Create]
|
||||||
|
@Id UNIQUEIDENTIFIER OUTPUT,
|
||||||
|
@UserId UNIQUEIDENTIFIER,
|
||||||
|
@SignatureAlgorithm TINYINT,
|
||||||
|
@SigningKey VARCHAR(MAX),
|
||||||
|
@VerifyingKey VARCHAR(MAX),
|
||||||
|
@CreationDate DATETIME2(7),
|
||||||
|
@RevisionDate DATETIME2(7)
|
||||||
|
AS
|
||||||
|
BEGIN
|
||||||
|
SET NOCOUNT ON
|
||||||
|
|
||||||
|
INSERT INTO [dbo].[UserSignatureKeyPair]
|
||||||
|
(
|
||||||
|
[Id],
|
||||||
|
[UserId],
|
||||||
|
[SignatureAlgorithm],
|
||||||
|
[SigningKey],
|
||||||
|
[VerifyingKey],
|
||||||
|
[CreationDate],
|
||||||
|
[RevisionDate]
|
||||||
|
)
|
||||||
|
VALUES
|
||||||
|
(
|
||||||
|
@Id,
|
||||||
|
@UserId,
|
||||||
|
@SignatureAlgorithm,
|
||||||
|
@SigningKey,
|
||||||
|
@VerifyingKey,
|
||||||
|
@CreationDate,
|
||||||
|
@RevisionDate
|
||||||
|
)
|
||||||
|
END
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
CREATE OR ALTER PROCEDURE [dbo].[UserSignatureKeyPair_Create]
|
||||||
|
@Id UNIQUEIDENTIFIER OUTPUT,
|
||||||
|
@UserId UNIQUEIDENTIFIER,
|
||||||
|
@SignatureAlgorithm TINYINT,
|
||||||
|
@SigningKey VARCHAR(MAX),
|
||||||
|
@VerifyingKey VARCHAR(MAX),
|
||||||
|
@CreationDate DATETIME2(7),
|
||||||
|
@RevisionDate DATETIME2(7)
|
||||||
|
AS
|
||||||
|
BEGIN
|
||||||
|
SET NOCOUNT ON
|
||||||
|
|
||||||
|
INSERT INTO [dbo].[UserSignatureKeyPair]
|
||||||
|
(
|
||||||
|
[Id],
|
||||||
|
[UserId],
|
||||||
|
[SignatureAlgorithm],
|
||||||
|
[SigningKey],
|
||||||
|
[VerifyingKey],
|
||||||
|
[CreationDate],
|
||||||
|
[RevisionDate]
|
||||||
|
)
|
||||||
|
VALUES
|
||||||
|
(
|
||||||
|
@Id,
|
||||||
|
@UserId,
|
||||||
|
@SignatureAlgorithm,
|
||||||
|
@SigningKey,
|
||||||
|
@VerifyingKey,
|
||||||
|
@CreationDate,
|
||||||
|
@RevisionDate
|
||||||
|
)
|
||||||
|
END
|
||||||
|
GO
|
||||||
Reference in New Issue
Block a user