Fix watchdog reattach information foreign key

This commit is contained in:
Cyberboss
2018-09-18 15:18:05 -04:00
parent 56d7f38eeb
commit 4b84e1f48e
2 changed files with 7 additions and 5 deletions
@@ -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);
}
/// <inheritdoc />
@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Tgstation.Server.Host.Models
namespace Tgstation.Server.Host.Models
{
/// <summary>
/// Database representation of <see cref="Components.Watchdog.WatchdogReattachInformation"/>
@@ -14,6 +10,11 @@ namespace Tgstation.Server.Host.Models
/// </summary>
public long Id { get; set; }
/// <summary>
/// The <see cref="Api.Models.Instance.Id"/> of the <see cref="Instance"/> the <see cref="WatchdogReattachInformation"/> belongs to
/// </summary>
public long InstanceId { get; set; }
/// <summary>
/// The <see cref="ReattachInformation"/> for the Alpha server
/// </summary>