From 632a8d72aea2fb8ecc75b5bd547e9b4bd6f9d37c Mon Sep 17 00:00:00 2001 From: Kevin BEAUGRAND Date: Fri, 3 May 2024 19:05:59 +0200 Subject: [PATCH] Fix #2980 - Add cascade delete to foreign keys --- .../PortalDbContext.cs | 14 +- ... cascade when deleting devices.Designer.cs | 606 +++++++++++++++++ ...values in cascade when deleting devices.cs | 67 ++ .../PortalDbContextModelSnapshot.cs | 8 +- ... cascade when deleting devices.Designer.cs | 611 ++++++++++++++++++ ...values in cascade when deleting devices.cs | 67 ++ .../PortalDbContextModelSnapshot.cs | 8 +- 7 files changed, 1372 insertions(+), 9 deletions(-) create mode 100644 src/IoTHub.Portal.MySql/Migrations/20240503170430_Fix #2980 - delete tag values in cascade when deleting devices.Designer.cs create mode 100644 src/IoTHub.Portal.MySql/Migrations/20240503170430_Fix #2980 - delete tag values in cascade when deleting devices.cs create mode 100644 src/IoTHub.Portal.Postgres/Migrations/20240503170119_Fix #2980 - delete tag values in cascade when deleting devices.Designer.cs create mode 100644 src/IoTHub.Portal.Postgres/Migrations/20240503170119_Fix #2980 - delete tag values in cascade when deleting devices.cs diff --git a/src/IoTHub.Portal.Infrastructure/PortalDbContext.cs b/src/IoTHub.Portal.Infrastructure/PortalDbContext.cs index 088797ff2..13b3593c6 100644 --- a/src/IoTHub.Portal.Infrastructure/PortalDbContext.cs +++ b/src/IoTHub.Portal.Infrastructure/PortalDbContext.cs @@ -25,10 +25,8 @@ public class PortalDbContext : DbContext, IDataProtectionKeyContext public DbSet