1
0
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:
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

@ -2737,7 +2737,8 @@ namespace Bit.MySqlMigrations.Migrations
b.HasOne("Bit.Infrastructure.EntityFramework.Vault.Models.SecurityTask", "Task")
.WithMany()
.HasForeignKey("TaskId");
.HasForeignKey("TaskId")
.OnDelete(DeleteBehavior.Cascade);
b.HasOne("Bit.Infrastructure.EntityFramework.Models.User", "User")
.WithMany()
@ -2852,7 +2853,8 @@ namespace Bit.MySqlMigrations.Migrations
{
b.HasOne("Bit.Infrastructure.EntityFramework.Vault.Models.Cipher", "Cipher")
.WithMany()
.HasForeignKey("CipherId");
.HasForeignKey("CipherId")
.OnDelete(DeleteBehavior.Cascade);
b.HasOne("Bit.Infrastructure.EntityFramework.AdminConsole.Models.Organization", "Organization")
.WithMany()