1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-08 04:00:31 -05:00

Use view for reading usersignaturekeypairs

This commit is contained in:
Bernd Schoolmann 2025-06-04 12:33:00 +02:00
parent fb00976e19
commit f47d552bff
No known key found for this signature in database
3 changed files with 15 additions and 2 deletions

View File

@ -3,6 +3,6 @@ CREATE PROCEDURE [dbo].[UserSignatureKeyPair_ReadByUserId]
AS
BEGIN
SELECT *
FROM [dbo].[UserSignatureKeyPair]
FROM [dbo].[UserSignatureKeyPairView]
WHERE [UserId] = @UserId;
END

View File

@ -0,0 +1,6 @@
CREATE VIEW [dbo].[UserSignatureKeyPairView]
AS
SELECT
*
FROM
[dbo].[UserSignatureKeyPair]

View File

@ -11,12 +11,19 @@ CREATE TABLE [dbo].[UserSignatureKeyPair] (
);
GO
CREATE VIEW [dbo].[UserSignatureKeyPairView]
AS
SELECT
*
FROM
[dbo].[UserSignatureKeyPair]
CREATE PROCEDURE [dbo].[UserSignatureKeyPair_ReadByUserId]
@UserId UNIQUEIDENTIFIER
AS
BEGIN
SELECT *
FROM [dbo].[UserSignatureKeyPair]
FROM [dbo].[UserSignatureKeyPairView]
WHERE [UserId] = @UserId;
END
GO