mirror of
https://github.com/bitwarden/server.git
synced 2025-06-30 15:42:48 -05:00
[PM-20064] Add cascade deletion for cipher with tasks (#5690)
* add cascade deletion for cipher tasks * add migrations for cascade delete on ciphers and security tasks * remove trailing comma * add SQL migration for PasswordHealthReportApplication - Allow cascade delete when an organization is deleted
This commit is contained in:
@ -0,0 +1,11 @@
|
||||
BEGIN
|
||||
IF EXISTS (SELECT 1 FROM sys.foreign_keys WHERE name = 'FK_Notification_SecurityTask')
|
||||
BEGIN
|
||||
ALTER TABLE [dbo].[Notification]
|
||||
DROP CONSTRAINT [FK_Notification_SecurityTask]
|
||||
END
|
||||
|
||||
ALTER TABLE [dbo].[Notification]
|
||||
ADD CONSTRAINT [FK_Notification_SecurityTask] FOREIGN KEY ([TaskId]) REFERENCES [dbo].[SecurityTask] ([Id]) ON DELETE CASCADE
|
||||
END
|
||||
GO
|
Reference in New Issue
Block a user