diff --git a/src/Tgstation.Server.Host/Models/DatabaseContext.cs b/src/Tgstation.Server.Host/Models/DatabaseContext.cs index 51998ddc2c..4fb568d700 100644 --- a/src/Tgstation.Server.Host/Models/DatabaseContext.cs +++ b/src/Tgstation.Server.Host/Models/DatabaseContext.cs @@ -130,6 +130,7 @@ namespace Tgstation.Server.Host.Models instanceModel.HasMany(x => x.RevisionInformations).WithOne(x => x.Instance).OnDelete(DeleteBehavior.Cascade); instanceModel.HasMany(x => x.InstanceUsers).WithOne(x => x.Instance).OnDelete(DeleteBehavior.Cascade); instanceModel.HasMany(x => x.Jobs).WithOne(x => x.Instance).OnDelete(DeleteBehavior.Cascade); + instanceModel.HasOne(x => x.WatchdogReattachInformation).WithOne().OnDelete(DeleteBehavior.Cascade); } /// diff --git a/src/Tgstation.Server.Host/Models/WatchdogReattachInformation.cs b/src/Tgstation.Server.Host/Models/WatchdogReattachInformation.cs index db27049745..204baed3b3 100644 --- a/src/Tgstation.Server.Host/Models/WatchdogReattachInformation.cs +++ b/src/Tgstation.Server.Host/Models/WatchdogReattachInformation.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace Tgstation.Server.Host.Models +namespace Tgstation.Server.Host.Models { /// /// Database representation of @@ -14,6 +10,11 @@ namespace Tgstation.Server.Host.Models /// public long Id { get; set; } + /// + /// The of the the belongs to + /// + public long InstanceId { get; set; } + /// /// The for the Alpha server ///