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:
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user