16#pragma warning disable 612, 618
18 .HasAnnotation(
"ProductVersion",
"2.1.4-rtm-31024")
19 .HasAnnotation(
"Relational:MaxIdentifierLength", 64);
21 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
23 b.Property<
long>(
"Id")
24 .ValueGeneratedOnAdd();
26 b.Property<
string>(
"ConnectionString")
29 b.Property<
bool?>(
"Enabled");
31 b.Property<
long>(
"InstanceId");
33 b.Property<
string>(
"Name")
36 b.Property<
int?>(
"Provider");
40 b.HasIndex(
"InstanceId");
45 b.ToTable(
"ChatBots");
48 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
50 b.Property<
long>(
"Id")
51 .ValueGeneratedOnAdd();
53 b.Property<
long>(
"ChatSettingsId");
55 b.Property<ulong?>(
"DiscordChannelId");
57 b.Property<
string>(
"IrcChannel");
59 b.Property<
bool?>(
"IsAdminChannel")
62 b.Property<
bool?>(
"IsUpdatesChannel")
65 b.Property<
bool?>(
"IsWatchdogChannel")
68 b.Property<
string>(
"Tag");
72 b.HasIndex(
"ChatSettingsId",
"DiscordChannelId")
75 b.HasIndex(
"ChatSettingsId",
"IrcChannel")
78 b.ToTable(
"ChatChannels");
81 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
83 b.Property<
long>(
"Id")
84 .ValueGeneratedOnAdd();
86 b.Property<
string>(
"ByondVersion")
89 b.Property<Guid?>(
"DirectoryName")
92 b.Property<
string>(
"DmeName")
95 b.Property<
long>(
"JobId");
97 b.Property<
int>(
"MinimumSecurityLevel");
99 b.Property<
string>(
"Output")
102 b.Property<
long>(
"RevisionInformationId");
106 b.HasIndex(
"DirectoryName");
111 b.HasIndex(
"RevisionInformationId");
113 b.ToTable(
"CompileJobs");
116 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
118 b.Property<
long>(
"Id")
119 .ValueGeneratedOnAdd();
121 b.Property<
string>(
"AccessToken");
123 b.Property<
bool?>(
"AllowWebClient")
126 b.Property<
bool?>(
"AutoStart")
129 b.Property<
long>(
"InstanceId");
131 b.Property<ushort?>(
"PrimaryPort")
134 b.Property<
int?>(
"ProcessId");
136 b.Property<ushort?>(
"SecondaryPort")
139 b.Property<
int>(
"SecurityLevel");
141 b.Property<
bool?>(
"SoftRestart")
144 b.Property<
bool?>(
"SoftShutdown")
147 b.Property<uint?>(
"StartupTimeout")
152 b.HasIndex(
"InstanceId")
155 b.ToTable(
"DreamDaemonSettings");
158 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
160 b.Property<
long>(
"Id")
161 .ValueGeneratedOnAdd();
163 b.Property<ushort?>(
"ApiValidationPort")
166 b.Property<
int>(
"ApiValidationSecurityLevel");
168 b.Property<
long>(
"InstanceId");
170 b.Property<
string>(
"ProjectName");
174 b.HasIndex(
"InstanceId")
177 b.ToTable(
"DreamMakerSettings");
180 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
182 b.Property<
long>(
"Id")
183 .ValueGeneratedOnAdd();
185 b.Property<uint?>(
"AutoUpdateInterval")
188 b.Property<
int>(
"ConfigurationType");
190 b.Property<
string>(
"Name")
193 b.Property<
bool?>(
"Online")
196 b.Property<
string>(
"Path")
204 b.ToTable(
"Instances");
207 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstanceUser", b =>
209 b.Property<
long>(
"Id")
210 .ValueGeneratedOnAdd();
212 b.Property<ulong>(
"ByondRights");
214 b.Property<ulong>(
"ChatBotRights");
216 b.Property<ulong>(
"ConfigurationRights");
218 b.Property<ulong>(
"DreamDaemonRights");
220 b.Property<ulong>(
"DreamMakerRights");
222 b.Property<
long>(
"InstanceId");
224 b.Property<ulong>(
"InstanceUserRights");
226 b.Property<ulong>(
"RepositoryRights");
228 b.Property<
long?>(
"UserId")
233 b.HasIndex(
"InstanceId");
235 b.HasIndex(
"UserId",
"InstanceId")
238 b.ToTable(
"InstanceUsers");
241 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
243 b.Property<
long>(
"Id")
244 .ValueGeneratedOnAdd();
246 b.Property<ulong?>(
"CancelRight");
248 b.Property<ulong?>(
"CancelRightsType");
250 b.Property<
bool?>(
"Cancelled")
253 b.Property<
long?>(
"CancelledById");
255 b.Property<
string>(
"Description")
258 b.Property<
string>(
"ExceptionDetails");
260 b.Property<
long>(
"InstanceId");
262 b.Property<DateTimeOffset?>(
"StartedAt")
265 b.Property<
long>(
"StartedById");
267 b.Property<DateTimeOffset?>(
"StoppedAt");
271 b.HasIndex(
"CancelledById");
273 b.HasIndex(
"InstanceId");
275 b.HasIndex(
"StartedById");
280 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
282 b.Property<
long>(
"Id")
283 .ValueGeneratedOnAdd();
285 b.Property<
string>(
"AccessIdentifier")
288 b.Property<
string>(
"ChatChannelsJson")
291 b.Property<
string>(
"ChatCommandsJson")
294 b.Property<
long>(
"CompileJobId");
296 b.Property<
bool>(
"IsPrimary");
298 b.Property<ushort>(
"Port");
300 b.Property<
int>(
"ProcessId");
302 b.Property<
int>(
"RebootState");
304 b.Property<
string>(
"ServerCommandsJson")
309 b.HasIndex(
"CompileJobId");
311 b.ToTable(
"ReattachInformations");
314 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
316 b.Property<
long>(
"Id")
317 .ValueGeneratedOnAdd();
319 b.Property<
string>(
"AccessToken");
321 b.Property<
string>(
"AccessUser");
323 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
326 b.Property<
bool?>(
"AutoUpdatesSynchronize")
329 b.Property<
string>(
"CommitterEmail")
332 b.Property<
string>(
"CommitterName")
335 b.Property<
long>(
"InstanceId");
337 b.Property<
bool?>(
"PostTestMergeComment")
340 b.Property<
bool?>(
"PushTestMergeCommits")
343 b.Property<
bool?>(
"ShowTestMergeCommitters")
348 b.HasIndex(
"InstanceId")
351 b.ToTable(
"RepositorySettings");
354 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
356 b.Property<
long>(
"Id")
357 .ValueGeneratedOnAdd();
359 b.Property<
long>(
"RevisionInformationId");
361 b.Property<
long>(
"TestMergeId");
365 b.HasIndex(
"RevisionInformationId");
367 b.HasIndex(
"TestMergeId");
369 b.ToTable(
"RevInfoTestMerges");
372 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
374 b.Property<
long>(
"Id")
375 .ValueGeneratedOnAdd();
377 b.Property<
string>(
"CommitSha")
381 b.Property<
long>(
"InstanceId");
383 b.Property<
string>(
"OriginCommitSha")
389 b.HasIndex(
"InstanceId",
"CommitSha")
392 b.ToTable(
"RevisionInformations");
395 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
397 b.Property<
long>(
"Id")
398 .ValueGeneratedOnAdd();
400 b.Property<
string>(
"Author")
403 b.Property<
string>(
"BodyAtMerge")
406 b.Property<
string>(
"Comment");
408 b.Property<DateTimeOffset>(
"MergedAt");
410 b.Property<
long>(
"MergedById");
412 b.Property<
int?>(
"Number")
415 b.Property<
long?>(
"PrimaryRevisionInformationId")
418 b.Property<
string>(
"PullRequestRevision")
421 b.Property<
string>(
"TitleAtMerge")
424 b.Property<
string>(
"Url")
429 b.HasIndex(
"MergedById");
431 b.HasIndex(
"PrimaryRevisionInformationId")
434 b.ToTable(
"TestMerges");
437 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
439 b.Property<
long>(
"Id")
440 .ValueGeneratedOnAdd();
442 b.Property<ulong>(
"AdministrationRights");
444 b.Property<
string>(
"CanonicalName")
447 b.Property<DateTimeOffset?>(
"CreatedAt")
450 b.Property<
long?>(
"CreatedById");
452 b.Property<
bool?>(
"Enabled")
455 b.Property<ulong>(
"InstanceManagerRights");
457 b.Property<DateTimeOffset?>(
"LastPasswordUpdate");
459 b.Property<
string>(
"Name")
462 b.Property<
string>(
"PasswordHash");
464 b.Property<
string>(
"SystemIdentifier");
468 b.HasIndex(
"CanonicalName")
471 b.HasIndex(
"CreatedById");
476 modelBuilder.Entity(
"Tgstation.Server.Host.Models.WatchdogReattachInformation", b =>
478 b.Property<
long>(
"Id")
479 .ValueGeneratedOnAdd();
481 b.Property<
long?>(
"AlphaId");
483 b.Property<
bool>(
"AlphaIsActive");
485 b.Property<
long?>(
"BravoId");
487 b.Property<
long>(
"InstanceId");
491 b.HasIndex(
"AlphaId");
493 b.HasIndex(
"BravoId");
495 b.HasIndex(
"InstanceId")
498 b.ToTable(
"WatchdogReattachInformations");
501 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
503 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
504 .WithMany(
"ChatSettings")
505 .HasForeignKey(
"InstanceId")
506 .OnDelete(DeleteBehavior.Cascade);
509 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
511 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
512 .WithMany(
"Channels")
513 .HasForeignKey(
"ChatSettingsId")
514 .OnDelete(DeleteBehavior.Cascade);
517 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
519 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
521 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
522 .OnDelete(DeleteBehavior.Restrict);
524 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
525 .WithMany(
"CompileJobs")
526 .HasForeignKey(
"RevisionInformationId")
527 .OnDelete(DeleteBehavior.Cascade);
530 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
532 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
533 .WithOne(
"DreamDaemonSettings")
534 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
535 .OnDelete(DeleteBehavior.Cascade);
538 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
540 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
541 .WithOne(
"DreamMakerSettings")
542 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
543 .OnDelete(DeleteBehavior.Cascade);
546 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstanceUser", b =>
548 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
549 .WithMany(
"InstanceUsers")
550 .HasForeignKey(
"InstanceId")
551 .OnDelete(DeleteBehavior.Cascade);
553 b.HasOne(
"Tgstation.Server.Host.Models.User")
554 .WithMany(
"InstanceUsers")
555 .HasForeignKey(
"UserId")
556 .OnDelete(DeleteBehavior.Cascade);
559 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
561 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
563 .HasForeignKey(
"CancelledById");
565 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
567 .HasForeignKey(
"InstanceId")
568 .OnDelete(DeleteBehavior.Cascade);
570 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
572 .HasForeignKey(
"StartedById")
573 .OnDelete(DeleteBehavior.Cascade);
576 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
578 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
580 .HasForeignKey(
"CompileJobId")
581 .OnDelete(DeleteBehavior.Cascade);
584 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
586 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
587 .WithOne(
"RepositorySettings")
588 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
589 .OnDelete(DeleteBehavior.Cascade);
592 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
594 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
595 .WithMany(
"ActiveTestMerges")
596 .HasForeignKey(
"RevisionInformationId")
597 .OnDelete(DeleteBehavior.Cascade);
599 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
600 .WithMany(
"RevisonInformations")
601 .HasForeignKey(
"TestMergeId")
602 .OnDelete(DeleteBehavior.Cascade);
605 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
607 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
608 .WithMany(
"RevisionInformations")
609 .HasForeignKey(
"InstanceId")
610 .OnDelete(DeleteBehavior.Cascade);
613 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
615 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
616 .WithMany(
"TestMerges")
617 .HasForeignKey(
"MergedById")
618 .OnDelete(DeleteBehavior.Restrict);
620 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
621 .WithOne(
"PrimaryTestMerge")
622 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
623 .OnDelete(DeleteBehavior.Restrict);
626 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
628 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
629 .WithMany(
"CreatedUsers")
630 .HasForeignKey(
"CreatedById");
633 modelBuilder.Entity(
"Tgstation.Server.Host.Models.WatchdogReattachInformation", b =>
635 b.HasOne(
"Tgstation.Server.Host.Models.ReattachInformation",
"Alpha")
637 .HasForeignKey(
"AlphaId");
639 b.HasOne(
"Tgstation.Server.Host.Models.ReattachInformation",
"Bravo")
641 .HasForeignKey(
"BravoId");
643 b.HasOne(
"Tgstation.Server.Host.Models.Instance")
644 .WithOne(
"WatchdogReattachInformation")
645 .HasForeignKey(
"Tgstation.Server.Host.Models.WatchdogReattachInformation",
"InstanceId")
646 .OnDelete(DeleteBehavior.Cascade);
648#pragma warning restore 612, 618