mirror of
https://github.com/bitwarden/server.git
synced 2025-04-26 15:22:19 -05:00

* 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
12 lines
392 B
Transact-SQL
12 lines
392 B
Transact-SQL
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
|