1
0
mirror of https://github.com/bitwarden/server synced 2025-12-25 20:53:16 +00: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:
Nick Krantz
2025-04-23 13:16:29 -05:00
committed by GitHub
parent 90d831d9ef
commit 6809709628
22 changed files with 19009 additions and 8 deletions

View File

@@ -34,6 +34,12 @@ public class NotificationEntityTypeConfiguration : IEntityTypeConfiguration<Noti
.HasIndex(n => n.TaskId)
.IsClustered(false);
builder
.HasOne(n => n.Task)
.WithMany()
.HasForeignKey(n => n.TaskId)
.OnDelete(DeleteBehavior.Cascade);
builder.ToTable(nameof(Notification));
}
}