mirror of
https://github.com/bitwarden/server
synced 2026-01-03 17:14:00 +00:00
new database schema for ciphers and history. dropped old site and folder tables.
This commit is contained in:
21
src/Sql/dbo/Stored Procedures/Cipher_DeleteById.sql
Normal file
21
src/Sql/dbo/Stored Procedures/Cipher_DeleteById.sql
Normal file
@@ -0,0 +1,21 @@
|
||||
CREATE PROCEDURE [dbo].[Cipher_DeleteById]
|
||||
@Id UNIQUEIDENTIFIER
|
||||
AS
|
||||
BEGIN
|
||||
BEGIN TRANSACTION Cipher_DeleteById
|
||||
|
||||
UPDATE
|
||||
[dbo].[Cipher]
|
||||
SET
|
||||
[FolderId] = NULL
|
||||
WHERE
|
||||
[FolderId] = @Id
|
||||
|
||||
DELETE
|
||||
FROM
|
||||
[dbo].[Cipher]
|
||||
WHERE
|
||||
[Id] = @Id
|
||||
|
||||
COMMIT TRANSACTION Cipher_DeleteById
|
||||
END
|
||||
Reference in New Issue
Block a user