1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-26 12:55:17 +01:00

update sprocs for denorm. userid on foldercipher

This commit is contained in:
Kyle Spearrin 2017-04-14 09:53:20 -04:00
parent 943ef81c06
commit f9ef519ec0
4 changed files with 11 additions and 6 deletions

View File

@ -35,7 +35,7 @@ BEGIN
IF @FolderId IS NOT NULL
BEGIN
EXEC [dbo].[FolderCipher_Create] @FolderId, @Id
EXEC [dbo].[FolderCipher_Create] @FolderId, @Id, @UserId
END
IF @Favorite = 1

View File

@ -26,7 +26,7 @@ BEGIN
IF @FolderId IS NOT NULL AND (@ExistingFolderId IS NULL OR @FolderId != @ExistingFolderId)
BEGIN
EXEC [dbo].[FolderCipher_Create] @FolderId, @Id
EXEC [dbo].[FolderCipher_Create] @FolderId, @Id, @UserId
END
IF @Favorite = 0

View File

@ -1,6 +1,7 @@
CREATE PROCEDURE [dbo].[FolderCipher_Create]
@FolderId UNIQUEIDENTIFIER,
@CipherId UNIQUEIDENTIFIER
@CipherId UNIQUEIDENTIFIER,
@UserId UNIQUEIDENTIFIER
AS
BEGIN
SET NOCOUNT ON
@ -8,11 +9,13 @@ BEGIN
INSERT INTO [dbo].[FolderCipher]
(
[FolderId],
[CipherId]
[CipherId],
[UserId]
)
VALUES
(
@FolderId,
@CipherId
@CipherId,
@UserId
)
END

View File

@ -1,6 +1,7 @@
CREATE PROCEDURE [dbo].[FolderCipher_Delete]
@FolderId UNIQUEIDENTIFIER,
@CipherId UNIQUEIDENTIFIER
@CipherId UNIQUEIDENTIFIER,
@UserId UNIQUEIDENTIFIER
AS
BEGIN
SET NOCOUNT ON
@ -11,4 +12,5 @@ BEGIN
WHERE
[FolderId] = @FolderId
AND [CipherId] = @CipherId
AND [UserId] = @UserId
END