16#pragma warning disable 612, 618
18 .HasAnnotation(
"ProductVersion",
"3.1.4");
20 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
22 b.Property<
long>(
"Id")
23 .ValueGeneratedOnAdd()
24 .HasColumnType(
"INTEGER");
26 b.Property<ushort?>(
"ChannelLimit")
28 .HasColumnType(
"INTEGER");
30 b.Property<
string>(
"ConnectionString")
32 .HasColumnType(
"TEXT")
35 b.Property<
bool?>(
"Enabled")
36 .HasColumnType(
"INTEGER");
38 b.Property<
long>(
"InstanceId")
39 .HasColumnType(
"INTEGER");
41 b.Property<
string>(
"Name")
43 .HasColumnType(
"TEXT")
46 b.Property<
int>(
"Provider")
47 .HasColumnType(
"INTEGER");
49 b.Property<uint?>(
"ReconnectionInterval")
51 .HasColumnType(
"INTEGER");
55 b.HasIndex(
"InstanceId",
"Name")
58 b.ToTable(
"ChatBots");
61 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
63 b.Property<
long>(
"Id")
64 .ValueGeneratedOnAdd()
65 .HasColumnType(
"INTEGER");
67 b.Property<
long>(
"ChatSettingsId")
68 .HasColumnType(
"INTEGER");
70 b.Property<ulong?>(
"DiscordChannelId")
71 .HasColumnType(
"INTEGER");
73 b.Property<
string>(
"IrcChannel")
74 .HasColumnType(
"TEXT")
77 b.Property<
bool?>(
"IsAdminChannel")
79 .HasColumnType(
"INTEGER");
81 b.Property<
bool?>(
"IsUpdatesChannel")
83 .HasColumnType(
"INTEGER");
85 b.Property<
bool?>(
"IsWatchdogChannel")
87 .HasColumnType(
"INTEGER");
89 b.Property<
string>(
"Tag")
90 .HasColumnType(
"TEXT")
95 b.HasIndex(
"ChatSettingsId",
"DiscordChannelId")
98 b.HasIndex(
"ChatSettingsId",
"IrcChannel")
101 b.ToTable(
"ChatChannels");
104 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
106 b.Property<
long>(
"Id")
107 .ValueGeneratedOnAdd()
108 .HasColumnType(
"INTEGER");
110 b.Property<
string>(
"ByondVersion")
112 .HasColumnType(
"TEXT");
114 b.Property<
int?>(
"DMApiMajorVersion")
115 .HasColumnType(
"INTEGER");
117 b.Property<
int?>(
"DMApiMinorVersion")
118 .HasColumnType(
"INTEGER");
120 b.Property<
int?>(
"DMApiPatchVersion")
121 .HasColumnType(
"INTEGER");
123 b.Property<Guid?>(
"DirectoryName")
125 .HasColumnType(
"TEXT");
127 b.Property<
string>(
"DmeName")
129 .HasColumnType(
"TEXT");
131 b.Property<
long>(
"JobId")
132 .HasColumnType(
"INTEGER");
134 b.Property<
int>(
"MinimumSecurityLevel")
135 .HasColumnType(
"INTEGER");
137 b.Property<
string>(
"Output")
139 .HasColumnType(
"TEXT");
141 b.Property<
long>(
"RevisionInformationId")
142 .HasColumnType(
"INTEGER");
146 b.HasIndex(
"DirectoryName");
151 b.HasIndex(
"RevisionInformationId");
153 b.ToTable(
"CompileJobs");
156 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
158 b.Property<
long>(
"Id")
159 .ValueGeneratedOnAdd()
160 .HasColumnType(
"INTEGER");
162 b.Property<
bool?>(
"AllowWebClient")
164 .HasColumnType(
"INTEGER");
166 b.Property<
bool?>(
"AutoStart")
168 .HasColumnType(
"INTEGER");
170 b.Property<uint?>(
"HeartbeatSeconds")
172 .HasColumnType(
"INTEGER");
174 b.Property<
long>(
"InstanceId")
175 .HasColumnType(
"INTEGER");
177 b.Property<ushort?>(
"PrimaryPort")
179 .HasColumnType(
"INTEGER");
181 b.Property<ushort?>(
"SecondaryPort")
183 .HasColumnType(
"INTEGER");
185 b.Property<
int>(
"SecurityLevel")
186 .HasColumnType(
"INTEGER");
188 b.Property<uint?>(
"StartupTimeout")
190 .HasColumnType(
"INTEGER");
192 b.Property<uint?>(
"TopicRequestTimeout")
194 .HasColumnType(
"INTEGER");
198 b.HasIndex(
"InstanceId")
201 b.ToTable(
"DreamDaemonSettings");
204 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
206 b.Property<
long>(
"Id")
207 .ValueGeneratedOnAdd()
208 .HasColumnType(
"INTEGER");
210 b.Property<ushort?>(
"ApiValidationPort")
212 .HasColumnType(
"INTEGER");
214 b.Property<
int>(
"ApiValidationSecurityLevel")
215 .HasColumnType(
"INTEGER");
217 b.Property<
long>(
"InstanceId")
218 .HasColumnType(
"INTEGER");
220 b.Property<
string>(
"ProjectName")
221 .HasColumnType(
"TEXT")
222 .HasMaxLength(10000);
226 b.HasIndex(
"InstanceId")
229 b.ToTable(
"DreamMakerSettings");
232 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DualReattachInformation", b =>
234 b.Property<
long>(
"Id")
235 .ValueGeneratedOnAdd()
236 .HasColumnType(
"INTEGER");
238 b.Property<
long?>(
"AlphaId")
239 .HasColumnType(
"INTEGER");
241 b.Property<
bool>(
"AlphaIsActive")
242 .HasColumnType(
"INTEGER");
244 b.Property<
long?>(
"BravoId")
245 .HasColumnType(
"INTEGER");
247 b.Property<
long>(
"InstanceId")
248 .HasColumnType(
"INTEGER");
252 b.HasIndex(
"AlphaId");
254 b.HasIndex(
"BravoId");
256 b.HasIndex(
"InstanceId")
259 b.ToTable(
"WatchdogReattachInformations");
262 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
264 b.Property<
long>(
"Id")
265 .ValueGeneratedOnAdd()
266 .HasColumnType(
"INTEGER");
268 b.Property<uint?>(
"AutoUpdateInterval")
270 .HasColumnType(
"INTEGER");
272 b.Property<ushort?>(
"ChatBotLimit")
274 .HasColumnType(
"INTEGER");
276 b.Property<
int>(
"ConfigurationType")
277 .HasColumnType(
"INTEGER");
279 b.Property<
string>(
"Name")
281 .HasColumnType(
"TEXT")
282 .HasMaxLength(10000);
284 b.Property<
bool?>(
"Online")
286 .HasColumnType(
"INTEGER");
288 b.Property<
string>(
"Path")
290 .HasColumnType(
"TEXT");
297 b.ToTable(
"Instances");
300 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstanceUser", b =>
302 b.Property<
long>(
"Id")
303 .ValueGeneratedOnAdd()
304 .HasColumnType(
"INTEGER");
306 b.Property<ulong>(
"ByondRights")
307 .HasColumnType(
"INTEGER");
309 b.Property<ulong>(
"ChatBotRights")
310 .HasColumnType(
"INTEGER");
312 b.Property<ulong>(
"ConfigurationRights")
313 .HasColumnType(
"INTEGER");
315 b.Property<ulong>(
"DreamDaemonRights")
316 .HasColumnType(
"INTEGER");
318 b.Property<ulong>(
"DreamMakerRights")
319 .HasColumnType(
"INTEGER");
321 b.Property<
long>(
"InstanceId")
322 .HasColumnType(
"INTEGER");
324 b.Property<ulong>(
"InstanceUserRights")
325 .HasColumnType(
"INTEGER");
327 b.Property<ulong>(
"RepositoryRights")
328 .HasColumnType(
"INTEGER");
330 b.Property<
long?>(
"UserId")
332 .HasColumnType(
"INTEGER");
336 b.HasIndex(
"InstanceId");
338 b.HasIndex(
"UserId",
"InstanceId")
341 b.ToTable(
"InstanceUsers");
344 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
346 b.Property<
long>(
"Id")
347 .ValueGeneratedOnAdd()
348 .HasColumnType(
"INTEGER");
350 b.Property<ulong?>(
"CancelRight")
351 .HasColumnType(
"INTEGER");
353 b.Property<ulong?>(
"CancelRightsType")
354 .HasColumnType(
"INTEGER");
356 b.Property<
bool?>(
"Cancelled")
358 .HasColumnType(
"INTEGER");
360 b.Property<
long?>(
"CancelledById")
361 .HasColumnType(
"INTEGER");
363 b.Property<
string>(
"Description")
365 .HasColumnType(
"TEXT");
367 b.Property<uint?>(
"ErrorCode")
368 .HasColumnType(
"INTEGER");
370 b.Property<
string>(
"ExceptionDetails")
371 .HasColumnType(
"TEXT");
373 b.Property<
long>(
"InstanceId")
374 .HasColumnType(
"INTEGER");
376 b.Property<DateTimeOffset?>(
"StartedAt")
378 .HasColumnType(
"TEXT");
380 b.Property<
long>(
"StartedById")
381 .HasColumnType(
"INTEGER");
383 b.Property<DateTimeOffset?>(
"StoppedAt")
384 .HasColumnType(
"TEXT");
388 b.HasIndex(
"CancelledById");
390 b.HasIndex(
"InstanceId");
392 b.HasIndex(
"StartedById");
397 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
399 b.Property<
long>(
"Id")
400 .ValueGeneratedOnAdd()
401 .HasColumnType(
"INTEGER");
403 b.Property<
string>(
"AccessIdentifier")
405 .HasColumnType(
"TEXT");
407 b.Property<
long>(
"CompileJobId")
408 .HasColumnType(
"INTEGER");
410 b.Property<
bool>(
"IsPrimary")
411 .HasColumnType(
"INTEGER");
413 b.Property<
int>(
"LaunchSecurityLevel")
414 .HasColumnType(
"INTEGER");
416 b.Property<ushort>(
"Port")
417 .HasColumnType(
"INTEGER");
419 b.Property<
int>(
"ProcessId")
420 .HasColumnType(
"INTEGER");
422 b.Property<
int>(
"RebootState")
423 .HasColumnType(
"INTEGER");
427 b.HasIndex(
"CompileJobId");
429 b.ToTable(
"ReattachInformations");
432 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
434 b.Property<
long>(
"Id")
435 .ValueGeneratedOnAdd()
436 .HasColumnType(
"INTEGER");
438 b.Property<
string>(
"AccessToken")
439 .HasColumnType(
"TEXT")
440 .HasMaxLength(10000);
442 b.Property<
string>(
"AccessUser")
443 .HasColumnType(
"TEXT")
444 .HasMaxLength(10000);
446 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
448 .HasColumnType(
"INTEGER");
450 b.Property<
bool?>(
"AutoUpdatesSynchronize")
452 .HasColumnType(
"INTEGER");
454 b.Property<
string>(
"CommitterEmail")
456 .HasColumnType(
"TEXT")
457 .HasMaxLength(10000);
459 b.Property<
string>(
"CommitterName")
461 .HasColumnType(
"TEXT")
462 .HasMaxLength(10000);
464 b.Property<
long>(
"InstanceId")
465 .HasColumnType(
"INTEGER");
467 b.Property<
bool?>(
"PostTestMergeComment")
469 .HasColumnType(
"INTEGER");
471 b.Property<
bool?>(
"PushTestMergeCommits")
473 .HasColumnType(
"INTEGER");
475 b.Property<
bool?>(
"ShowTestMergeCommitters")
477 .HasColumnType(
"INTEGER");
481 b.HasIndex(
"InstanceId")
484 b.ToTable(
"RepositorySettings");
487 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
489 b.Property<
long>(
"Id")
490 .ValueGeneratedOnAdd()
491 .HasColumnType(
"INTEGER");
493 b.Property<
long>(
"RevisionInformationId")
494 .HasColumnType(
"INTEGER");
496 b.Property<
long>(
"TestMergeId")
497 .HasColumnType(
"INTEGER");
501 b.HasIndex(
"RevisionInformationId");
503 b.HasIndex(
"TestMergeId");
505 b.ToTable(
"RevInfoTestMerges");
508 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
510 b.Property<
long>(
"Id")
511 .ValueGeneratedOnAdd()
512 .HasColumnType(
"INTEGER");
514 b.Property<
string>(
"CommitSha")
516 .HasColumnType(
"TEXT")
519 b.Property<
long>(
"InstanceId")
520 .HasColumnType(
"INTEGER");
522 b.Property<
string>(
"OriginCommitSha")
524 .HasColumnType(
"TEXT")
529 b.HasIndex(
"InstanceId",
"CommitSha")
532 b.ToTable(
"RevisionInformations");
535 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
537 b.Property<
long>(
"Id")
538 .ValueGeneratedOnAdd()
539 .HasColumnType(
"INTEGER");
541 b.Property<
string>(
"Author")
543 .HasColumnType(
"TEXT");
545 b.Property<
string>(
"BodyAtMerge")
547 .HasColumnType(
"TEXT");
549 b.Property<
string>(
"Comment")
550 .HasColumnType(
"TEXT")
551 .HasMaxLength(10000);
553 b.Property<DateTimeOffset>(
"MergedAt")
554 .HasColumnType(
"TEXT");
556 b.Property<
long>(
"MergedById")
557 .HasColumnType(
"INTEGER");
559 b.Property<
int>(
"Number")
560 .HasColumnType(
"INTEGER");
562 b.Property<
long?>(
"PrimaryRevisionInformationId")
564 .HasColumnType(
"INTEGER");
566 b.Property<
string>(
"PullRequestRevision")
568 .HasColumnType(
"TEXT")
571 b.Property<
string>(
"TitleAtMerge")
573 .HasColumnType(
"TEXT");
575 b.Property<
string>(
"Url")
577 .HasColumnType(
"TEXT");
581 b.HasIndex(
"MergedById");
583 b.HasIndex(
"PrimaryRevisionInformationId")
586 b.ToTable(
"TestMerges");
589 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
591 b.Property<
long?>(
"Id")
592 .ValueGeneratedOnAdd()
593 .HasColumnType(
"INTEGER");
595 b.Property<ulong>(
"AdministrationRights")
596 .HasColumnType(
"INTEGER");
598 b.Property<
string>(
"CanonicalName")
600 .HasColumnType(
"TEXT");
602 b.Property<DateTimeOffset?>(
"CreatedAt")
604 .HasColumnType(
"TEXT");
606 b.Property<
long?>(
"CreatedById")
607 .HasColumnType(
"INTEGER");
609 b.Property<
bool?>(
"Enabled")
611 .HasColumnType(
"INTEGER");
613 b.Property<ulong>(
"InstanceManagerRights")
614 .HasColumnType(
"INTEGER");
616 b.Property<DateTimeOffset?>(
"LastPasswordUpdate")
617 .HasColumnType(
"TEXT");
619 b.Property<
string>(
"Name")
621 .HasColumnType(
"TEXT")
622 .HasMaxLength(10000);
624 b.Property<
string>(
"PasswordHash")
625 .HasColumnType(
"TEXT");
627 b.Property<
string>(
"SystemIdentifier")
628 .HasColumnType(
"TEXT");
632 b.HasIndex(
"CanonicalName")
635 b.HasIndex(
"CreatedById");
637 b.HasIndex(
"SystemIdentifier")
643 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
645 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
646 .WithMany(
"ChatSettings")
647 .HasForeignKey(
"InstanceId")
648 .OnDelete(DeleteBehavior.Cascade)
652 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
654 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
655 .WithMany(
"Channels")
656 .HasForeignKey(
"ChatSettingsId")
657 .OnDelete(DeleteBehavior.Cascade)
661 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
663 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
665 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
666 .OnDelete(DeleteBehavior.Cascade)
669 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
670 .WithMany(
"CompileJobs")
671 .HasForeignKey(
"RevisionInformationId")
672 .OnDelete(DeleteBehavior.ClientNoAction)
676 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
678 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
679 .WithOne(
"DreamDaemonSettings")
680 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
681 .OnDelete(DeleteBehavior.Cascade)
685 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
687 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
688 .WithOne(
"DreamMakerSettings")
689 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
690 .OnDelete(DeleteBehavior.Cascade)
694 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DualReattachInformation", b =>
696 b.HasOne(
"Tgstation.Server.Host.Models.ReattachInformation",
"Alpha")
698 .HasForeignKey(
"AlphaId");
700 b.HasOne(
"Tgstation.Server.Host.Models.ReattachInformation",
"Bravo")
702 .HasForeignKey(
"BravoId");
704 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
null)
705 .WithOne(
"WatchdogReattachInformation")
706 .HasForeignKey(
"Tgstation.Server.Host.Models.DualReattachInformation",
"InstanceId")
707 .OnDelete(DeleteBehavior.Cascade)
711 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstanceUser", b =>
713 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
714 .WithMany(
"InstanceUsers")
715 .HasForeignKey(
"InstanceId")
716 .OnDelete(DeleteBehavior.Cascade)
719 b.HasOne(
"Tgstation.Server.Host.Models.User",
null)
720 .WithMany(
"InstanceUsers")
721 .HasForeignKey(
"UserId")
722 .OnDelete(DeleteBehavior.Cascade)
726 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
728 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
730 .HasForeignKey(
"CancelledById");
732 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
734 .HasForeignKey(
"InstanceId")
735 .OnDelete(DeleteBehavior.Cascade)
738 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
740 .HasForeignKey(
"StartedById")
741 .OnDelete(DeleteBehavior.Cascade)
745 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
747 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
749 .HasForeignKey(
"CompileJobId")
750 .OnDelete(DeleteBehavior.Cascade)
754 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
756 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
757 .WithOne(
"RepositorySettings")
758 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
759 .OnDelete(DeleteBehavior.Cascade)
763 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
765 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
766 .WithMany(
"ActiveTestMerges")
767 .HasForeignKey(
"RevisionInformationId")
768 .OnDelete(DeleteBehavior.Cascade)
771 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
772 .WithMany(
"RevisonInformations")
773 .HasForeignKey(
"TestMergeId")
774 .OnDelete(DeleteBehavior.ClientNoAction)
778 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
780 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
781 .WithMany(
"RevisionInformations")
782 .HasForeignKey(
"InstanceId")
783 .OnDelete(DeleteBehavior.Cascade)
787 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
789 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
790 .WithMany(
"TestMerges")
791 .HasForeignKey(
"MergedById")
792 .OnDelete(DeleteBehavior.Restrict)
795 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
796 .WithOne(
"PrimaryTestMerge")
797 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
798 .OnDelete(DeleteBehavior.Cascade)
802 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
804 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
805 .WithMany(
"CreatedUsers")
806 .HasForeignKey(
"CreatedById");
808#pragma warning restore 612, 618