mirror of
https://github.com/Cleanuparr/Cleanuparr.git
synced 2026-03-04 14:27:52 -05:00
try fix sonarr
This commit is contained in:
@@ -58,6 +58,15 @@ public class DataContext : DbContext
|
||||
entity.ComplexProperty(e => e.ContentBlocker);
|
||||
});
|
||||
|
||||
// Configure ArrConfig -> ArrInstance relationship
|
||||
modelBuilder.Entity<ArrConfig>(entity =>
|
||||
{
|
||||
entity.HasMany(a => a.Instances)
|
||||
.WithOne(i => i.ArrConfig)
|
||||
.HasForeignKey(i => i.ArrConfigId)
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
|
||||
foreach (var entityType in modelBuilder.Model.GetEntityTypes())
|
||||
{
|
||||
var enumProperties = entityType.ClrType.GetProperties()
|
||||
|
||||
@@ -12,7 +12,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
namespace Data.Migrations.Data
|
||||
{
|
||||
[DbContext(typeof(DataContext))]
|
||||
[Migration("20250615170420_InitialData")]
|
||||
[Migration("20250615190608_InitialData")]
|
||||
partial class InitialData
|
||||
{
|
||||
/// <inheritdoc />
|
||||
@@ -202,7 +202,7 @@ namespace Data.Migrations.Data
|
||||
principalTable: "download_cleaner_configs",
|
||||
principalColumn: "id");
|
||||
});
|
||||
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "queue_cleaner_configs",
|
||||
columns: new[]
|
||||
@@ -12,7 +12,7 @@ public sealed class ArrInstance
|
||||
|
||||
public Guid ArrConfigId { get; set; }
|
||||
|
||||
public ArrConfig ArrConfig { get; set; }
|
||||
public ArrConfig? ArrConfig { get; set; }
|
||||
|
||||
public required string Name { get; set; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user