1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-14 22:27:32 -05:00

[PM-3505][PM-4587] Update Delete Organization and User SPROCs and EF methods (#3604)

* update Organization_DeleteById SPROC

* Add migration for user delete

* Updated delete methods for EF support

* added WITH RECOMPILE

* updating sprocs in sql project

* Add recompile
This commit is contained in:
Ike
2023-12-27 07:08:49 -08:00
committed by GitHub
parent c60f260c0f
commit 9b50cf89b7
6 changed files with 290 additions and 0 deletions

View File

@ -1,5 +1,6 @@
CREATE PROCEDURE [dbo].[Organization_DeleteById]
@Id UNIQUEIDENTIFIER
WITH RECOMPILE
AS
BEGIN
SET NOCOUNT ON
@ -25,6 +26,12 @@ BEGIN
BEGIN TRANSACTION Organization_DeleteById
DELETE
FROM
[dbo].[AuthRequest]
WHERE
[OrganizationId] = @Id
DELETE
FROM
[dbo].[SsoUser]

View File

@ -24,6 +24,13 @@ BEGIN
BEGIN TRANSACTION User_DeleteById
-- Delete WebAuthnCredentials
DELETE
FROM
[dbo].[WebAuthnCredential]
WHERE
[UserId] = @Id
-- Delete folders
DELETE
FROM