1
0
mirror of https://github.com/bitwarden/server synced 2026-01-04 01:23:25 +00:00

[Soft-Delete] Simplify the data-tier, removed extra sprocs and reuse update

This commit is contained in:
Chad Scharf
2020-04-01 16:39:27 -04:00
parent f6044f0d00
commit d07f27f274
14 changed files with 65 additions and 200 deletions

View File

@@ -13,7 +13,7 @@
@Favorite BIT,
@Edit BIT, -- not used
@OrganizationUseTotp BIT, -- not used
@DeletedDate DATETIME2(7) -- not used
@DeletedDate DATETIME2(7)
AS
BEGIN
SET NOCOUNT ON
@@ -31,7 +31,8 @@ BEGIN
[Favorites],
[Folders],
[CreationDate],
[RevisionDate]
[RevisionDate],
[DeletedDate]
)
VALUES
(
@@ -43,7 +44,8 @@ BEGIN
CASE WHEN @Favorite = 1 THEN CONCAT('{', @UserIdKey, ':true}') ELSE NULL END,
CASE WHEN @FolderId IS NOT NULL THEN CONCAT('{', @UserIdKey, ':"', @FolderId, '"', '}') ELSE NULL END,
@CreationDate,
@RevisionDate
@RevisionDate,
@DeletedDate
)
IF @OrganizationId IS NOT NULL