1
0
mirror of https://github.com/bitwarden/server.git synced 2025-04-05 13:08:17 -05:00
bitwarden/src/Sql/dbo/Stored Procedures/OrganizationSponsorship_OrganizationUserDeleted.sql
Justin Baur f235938c41
Change OrgUser Delete Behavior (#2010)
* Fix OrgUserDelete sprocs

* Update Sqlproj
2022-05-23 15:50:54 -04:00

17 lines
326 B
Transact-SQL

CREATE PROCEDURE [dbo].[OrganizationSponsorship_OrganizationUserDeleted]
@OrganizationUserId UNIQUEIDENTIFIER
AS
BEGIN
SET NOCOUNT ON
UPDATE
OS
SET
[ToDelete] = 1
FROM
[dbo].[OrganizationSponsorship] OS
WHERE
[SponsoringOrganizationUserId] = @OrganizationUserId
END
GO