mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-29 16:11:05 +01:00
EF Model integrity fixups
This commit is contained in:
@@ -11,6 +11,11 @@ namespace Tgstation.Server.Host.Models
|
||||
/// </summary>
|
||||
public Job Job { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The <see cref="Api.Models.Internal.Job.Id"/> of <see cref="Job"/>
|
||||
/// </summary>
|
||||
public long JobId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// See <see cref="Api.Models.CompileJob.RevisionInformation"/>
|
||||
/// </summary>
|
||||
|
||||
@@ -112,6 +112,8 @@ namespace Tgstation.Server.Host.Models
|
||||
|
||||
modelBuilder.Entity<CompileJob>().HasIndex(x => x.DirectoryName);
|
||||
|
||||
modelBuilder.Entity<Job>().HasOne<CompileJob>().WithOne(x => x.Job).OnDelete(DeleteBehavior.Restrict);
|
||||
|
||||
var chatChannel = modelBuilder.Entity<ChatChannel>();
|
||||
chatChannel.HasIndex(x => new { x.ChatSettingsId, x.IrcChannel }).IsUnique();
|
||||
chatChannel.HasIndex(x => new { x.ChatSettingsId, x.DiscordChannelId }).IsUnique();
|
||||
|
||||
Reference in New Issue
Block a user