1
0
mirror of https://github.com/bitwarden/server synced 2025-12-10 13:23:27 +00:00

Add create SP

This commit is contained in:
Bernd Schoolmann
2025-12-03 13:04:56 +01:00
parent 54a9914e5c
commit d0705f163d
2 changed files with 67 additions and 0 deletions

View File

@@ -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

View File

@@ -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