12 protected override void BuildModel(ModelBuilder modelBuilder)
14#pragma warning disable 612, 618
16 .HasAnnotation(
"ProductVersion",
"8.0.13")
17 .HasAnnotation(
"Relational:MaxIdentifierLength", 128);
19 SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
21 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
23 b.Property<
long?>(
"Id")
24 .ValueGeneratedOnAdd()
25 .HasColumnType(
"bigint");
27 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
29 b.Property<
int>(
"ChannelLimit")
30 .HasColumnType(
"int");
32 b.Property<
string>(
"ConnectionString")
35 .HasColumnType(
"nvarchar(max)");
37 b.Property<
bool?>(
"Enabled")
38 .HasColumnType(
"bit");
40 b.Property<
long>(
"InstanceId")
41 .HasColumnType(
"bigint");
43 b.Property<
string>(
"Name")
46 .HasColumnType(
"nvarchar(100)");
48 b.Property<
int>(
"Provider")
49 .HasColumnType(
"int");
51 b.Property<
long>(
"ReconnectionInterval")
52 .HasColumnType(
"bigint");
56 b.HasIndex(
"InstanceId",
"Name")
59 b.ToTable(
"ChatBots");
62 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
64 b.Property<
long>(
"Id")
65 .ValueGeneratedOnAdd()
66 .HasColumnType(
"bigint");
68 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
70 b.Property<
long>(
"ChatSettingsId")
71 .HasColumnType(
"bigint");
73 b.Property<decimal?>(
"DiscordChannelId")
74 .HasColumnType(
"decimal(20,0)");
76 b.Property<
string>(
"IrcChannel")
78 .HasColumnType(
"nvarchar(100)");
80 b.Property<
bool?>(
"IsAdminChannel")
82 .HasColumnType(
"bit");
84 b.Property<
bool?>(
"IsSystemChannel")
86 .HasColumnType(
"bit");
88 b.Property<
bool?>(
"IsUpdatesChannel")
90 .HasColumnType(
"bit");
92 b.Property<
bool?>(
"IsWatchdogChannel")
94 .HasColumnType(
"bit");
96 b.Property<
string>(
"Tag")
98 .HasColumnType(
"nvarchar(max)");
102 b.HasIndex(
"ChatSettingsId",
"DiscordChannelId")
104 .HasFilter(
"[DiscordChannelId] IS NOT NULL");
106 b.HasIndex(
"ChatSettingsId",
"IrcChannel")
108 .HasFilter(
"[IrcChannel] IS NOT NULL");
110 b.ToTable(
"ChatChannels");
113 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
115 b.Property<
long?>(
"Id")
116 .ValueGeneratedOnAdd()
117 .HasColumnType(
"bigint");
119 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
121 b.Property<
int?>(
"DMApiMajorVersion")
122 .HasColumnType(
"int");
124 b.Property<
int?>(
"DMApiMinorVersion")
125 .HasColumnType(
"int");
127 b.Property<
int?>(
"DMApiPatchVersion")
128 .HasColumnType(
"int");
130 b.Property<Guid?>(
"DirectoryName")
132 .HasColumnType(
"uniqueidentifier");
134 b.Property<
string>(
"DmeName")
136 .HasColumnType(
"nvarchar(max)");
138 b.Property<
string>(
"EngineVersion")
140 .HasColumnType(
"nvarchar(max)");
142 b.Property<
long?>(
"GitHubDeploymentId")
143 .HasColumnType(
"bigint");
145 b.Property<
long?>(
"GitHubRepoId")
146 .HasColumnType(
"bigint");
148 b.Property<
long>(
"JobId")
149 .HasColumnType(
"bigint");
151 b.Property<
int?>(
"MinimumSecurityLevel")
152 .HasColumnType(
"int");
154 b.Property<
string>(
"Output")
156 .HasColumnType(
"nvarchar(max)");
158 b.Property<
string>(
"RepositoryOrigin")
159 .HasColumnType(
"nvarchar(max)");
161 b.Property<
long>(
"RevisionInformationId")
162 .HasColumnType(
"bigint");
166 b.HasIndex(
"DirectoryName");
171 b.HasIndex(
"RevisionInformationId");
173 b.ToTable(
"CompileJobs");
176 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
178 b.Property<
long>(
"Id")
179 .ValueGeneratedOnAdd()
180 .HasColumnType(
"bigint");
182 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
184 b.Property<
string>(
"AdditionalParameters")
187 .HasColumnType(
"nvarchar(max)");
189 b.Property<
bool?>(
"AllowWebClient")
191 .HasColumnType(
"bit");
193 b.Property<
bool?>(
"AutoStart")
195 .HasColumnType(
"bit");
197 b.Property<
bool?>(
"DumpOnHealthCheckRestart")
199 .HasColumnType(
"bit");
201 b.Property<
long>(
"HealthCheckSeconds")
202 .HasColumnType(
"bigint");
204 b.Property<
long>(
"InstanceId")
205 .HasColumnType(
"bigint");
207 b.Property<
bool?>(
"LogOutput")
209 .HasColumnType(
"bit");
211 b.Property<
long>(
"MapThreads")
212 .HasColumnType(
"bigint");
214 b.Property<
bool?>(
"Minidumps")
216 .HasColumnType(
"bit");
218 b.Property<
int>(
"OpenDreamTopicPort")
219 .HasColumnType(
"int");
221 b.Property<
int>(
"Port")
222 .HasColumnType(
"int");
224 b.Property<
int>(
"SecurityLevel")
225 .HasColumnType(
"int");
227 b.Property<
bool?>(
"StartProfiler")
229 .HasColumnType(
"bit");
231 b.Property<
long>(
"StartupTimeout")
232 .HasColumnType(
"bigint");
234 b.Property<
long>(
"TopicRequestTimeout")
235 .HasColumnType(
"bigint");
237 b.Property<
int>(
"Visibility")
238 .HasColumnType(
"int");
242 b.HasIndex(
"InstanceId")
245 b.ToTable(
"DreamDaemonSettings");
248 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
250 b.Property<
long>(
"Id")
251 .ValueGeneratedOnAdd()
252 .HasColumnType(
"bigint");
254 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
256 b.Property<
int>(
"ApiValidationPort")
257 .HasColumnType(
"int");
259 b.Property<
int>(
"ApiValidationSecurityLevel")
260 .HasColumnType(
"int");
262 b.Property<
string>(
"CompilerAdditionalArguments")
264 .HasColumnType(
"nvarchar(max)");
266 b.Property<
int>(
"DMApiValidationMode")
267 .HasColumnType(
"int");
269 b.Property<
long>(
"InstanceId")
270 .HasColumnType(
"bigint");
272 b.Property<
string>(
"ProjectName")
274 .HasColumnType(
"nvarchar(max)");
276 b.Property<TimeSpan?>(
"Timeout")
278 .HasColumnType(
"time");
282 b.HasIndex(
"InstanceId")
285 b.ToTable(
"DreamMakerSettings");
288 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
290 b.Property<
long?>(
"Id")
291 .ValueGeneratedOnAdd()
292 .HasColumnType(
"bigint");
294 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
296 b.Property<
string>(
"AutoStartCron")
299 .HasColumnType(
"nvarchar(1000)");
301 b.Property<
string>(
"AutoStopCron")
304 .HasColumnType(
"nvarchar(1000)");
306 b.Property<
string>(
"AutoUpdateCron")
309 .HasColumnType(
"nvarchar(1000)");
311 b.Property<
long>(
"AutoUpdateInterval")
312 .HasColumnType(
"bigint");
314 b.Property<
int>(
"ChatBotLimit")
315 .HasColumnType(
"int");
317 b.Property<
int>(
"ConfigurationType")
318 .HasColumnType(
"int");
320 b.Property<
string>(
"Name")
323 .HasColumnType(
"nvarchar(100)");
325 b.Property<
bool?>(
"Online")
327 .HasColumnType(
"bit");
329 b.Property<
string>(
"Path")
331 .HasColumnType(
"nvarchar(450)");
333 b.Property<
string>(
"SwarmIdentifer")
334 .HasColumnType(
"nvarchar(450)");
338 b.HasIndex(
"Path",
"SwarmIdentifer")
340 .HasFilter(
"[SwarmIdentifer] IS NOT NULL");
342 b.ToTable(
"Instances");
345 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
347 b.Property<
long>(
"Id")
348 .ValueGeneratedOnAdd()
349 .HasColumnType(
"bigint");
351 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
353 b.Property<decimal>(
"ChatBotRights")
354 .HasColumnType(
"decimal(20,0)");
356 b.Property<decimal>(
"ConfigurationRights")
357 .HasColumnType(
"decimal(20,0)");
359 b.Property<decimal>(
"DreamDaemonRights")
360 .HasColumnType(
"decimal(20,0)");
362 b.Property<decimal>(
"DreamMakerRights")
363 .HasColumnType(
"decimal(20,0)");
365 b.Property<decimal>(
"EngineRights")
366 .HasColumnType(
"decimal(20,0)");
368 b.Property<
long>(
"InstanceId")
369 .HasColumnType(
"bigint");
371 b.Property<decimal>(
"InstancePermissionSetRights")
372 .HasColumnType(
"decimal(20,0)");
374 b.Property<
long>(
"PermissionSetId")
375 .HasColumnType(
"bigint");
377 b.Property<decimal>(
"RepositoryRights")
378 .HasColumnType(
"decimal(20,0)");
382 b.HasIndex(
"InstanceId");
384 b.HasIndex(
"PermissionSetId",
"InstanceId")
387 b.ToTable(
"InstancePermissionSets");
390 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
392 b.Property<
long?>(
"Id")
393 .ValueGeneratedOnAdd()
394 .HasColumnType(
"bigint");
396 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
398 b.Property<decimal?>(
"CancelRight")
399 .HasColumnType(
"decimal(20,0)");
401 b.Property<decimal?>(
"CancelRightsType")
402 .HasColumnType(
"decimal(20,0)");
404 b.Property<
bool?>(
"Cancelled")
406 .HasColumnType(
"bit");
408 b.Property<
long?>(
"CancelledById")
409 .HasColumnType(
"bigint");
411 b.Property<
string>(
"Description")
413 .HasColumnType(
"nvarchar(max)");
415 b.Property<
long?>(
"ErrorCode")
416 .HasColumnType(
"bigint");
418 b.Property<
string>(
"ExceptionDetails")
419 .HasColumnType(
"nvarchar(max)");
421 b.Property<
long>(
"InstanceId")
422 .HasColumnType(
"bigint");
424 b.Property<
byte>(
"JobCode")
425 .HasColumnType(
"tinyint");
427 b.Property<DateTimeOffset?>(
"StartedAt")
429 .HasColumnType(
"datetimeoffset");
431 b.Property<
long>(
"StartedById")
432 .HasColumnType(
"bigint");
434 b.Property<DateTimeOffset?>(
"StoppedAt")
435 .HasColumnType(
"datetimeoffset");
439 b.HasIndex(
"CancelledById");
441 b.HasIndex(
"InstanceId");
443 b.HasIndex(
"StartedById");
448 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
450 b.Property<
long>(
"Id")
451 .ValueGeneratedOnAdd()
452 .HasColumnType(
"bigint");
454 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
456 b.Property<
string>(
"ExternalUserId")
459 .HasColumnType(
"nvarchar(100)");
461 b.Property<
int>(
"Provider")
462 .HasColumnType(
"int");
464 b.Property<
long>(
"UserId")
465 .HasColumnType(
"bigint");
469 b.HasIndex(
"UserId");
471 b.HasIndex(
"Provider",
"ExternalUserId")
474 b.ToTable(
"OAuthConnections");
477 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OidcConnection", b =>
479 b.Property<
long>(
"Id")
480 .ValueGeneratedOnAdd()
481 .HasColumnType(
"bigint");
483 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
485 b.Property<
string>(
"ExternalUserId")
488 .HasColumnType(
"nvarchar(100)");
490 b.Property<
string>(
"SchemeKey")
493 .HasColumnType(
"nvarchar(100)");
495 b.Property<
long>(
"UserId")
496 .HasColumnType(
"bigint");
500 b.HasIndex(
"UserId");
502 b.HasIndex(
"SchemeKey",
"ExternalUserId")
505 b.ToTable(
"OidcConnections");
508 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
510 b.Property<
long?>(
"Id")
511 .ValueGeneratedOnAdd()
512 .HasColumnType(
"bigint");
514 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
516 b.Property<decimal>(
"AdministrationRights")
517 .HasColumnType(
"decimal(20,0)");
519 b.Property<
long?>(
"GroupId")
520 .HasColumnType(
"bigint");
522 b.Property<decimal>(
"InstanceManagerRights")
523 .HasColumnType(
"decimal(20,0)");
525 b.Property<
long?>(
"UserId")
526 .HasColumnType(
"bigint");
530 b.HasIndex(
"GroupId")
532 .HasFilter(
"[GroupId] IS NOT NULL");
536 .HasFilter(
"[UserId] IS NOT NULL");
538 b.ToTable(
"PermissionSets");
541 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
543 b.Property<
long?>(
"Id")
544 .ValueGeneratedOnAdd()
545 .HasColumnType(
"bigint");
547 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
549 b.Property<
string>(
"AccessIdentifier")
551 .HasColumnType(
"nvarchar(max)");
553 b.Property<
long>(
"CompileJobId")
554 .HasColumnType(
"bigint");
556 b.Property<
long?>(
"InitialCompileJobId")
557 .HasColumnType(
"bigint");
559 b.Property<
int>(
"LaunchSecurityLevel")
560 .HasColumnType(
"int");
562 b.Property<
int>(
"LaunchVisibility")
563 .HasColumnType(
"int");
565 b.Property<
int>(
"Port")
566 .HasColumnType(
"int");
568 b.Property<
int>(
"ProcessId")
569 .HasColumnType(
"int");
571 b.Property<
int>(
"RebootState")
572 .HasColumnType(
"int");
574 b.Property<
int?>(
"TopicPort")
575 .HasColumnType(
"int");
579 b.HasIndex(
"CompileJobId");
581 b.HasIndex(
"InitialCompileJobId");
583 b.ToTable(
"ReattachInformations");
586 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
588 b.Property<
long>(
"Id")
589 .ValueGeneratedOnAdd()
590 .HasColumnType(
"bigint");
592 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
594 b.Property<
string>(
"AccessToken")
596 .HasColumnType(
"nvarchar(max)");
598 b.Property<
string>(
"AccessUser")
600 .HasColumnType(
"nvarchar(max)");
602 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
604 .HasColumnType(
"bit");
606 b.Property<
bool?>(
"AutoUpdatesSynchronize")
608 .HasColumnType(
"bit");
610 b.Property<
string>(
"CommitterEmail")
613 .HasColumnType(
"nvarchar(max)");
615 b.Property<
string>(
"CommitterName")
618 .HasColumnType(
"nvarchar(max)");
620 b.Property<
bool?>(
"CreateGitHubDeployments")
622 .HasColumnType(
"bit");
624 b.Property<
long>(
"InstanceId")
625 .HasColumnType(
"bigint");
627 b.Property<
bool?>(
"PostTestMergeComment")
629 .HasColumnType(
"bit");
631 b.Property<
bool?>(
"PushTestMergeCommits")
633 .HasColumnType(
"bit");
635 b.Property<
bool?>(
"ShowTestMergeCommitters")
637 .HasColumnType(
"bit");
639 b.Property<
bool?>(
"UpdateSubmodules")
641 .HasColumnType(
"bit");
645 b.HasIndex(
"InstanceId")
648 b.ToTable(
"RepositorySettings");
651 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
653 b.Property<
long>(
"Id")
654 .ValueGeneratedOnAdd()
655 .HasColumnType(
"bigint");
657 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
659 b.Property<
long>(
"RevisionInformationId")
660 .HasColumnType(
"bigint");
662 b.Property<
long>(
"TestMergeId")
663 .HasColumnType(
"bigint");
667 b.HasIndex(
"RevisionInformationId");
669 b.HasIndex(
"TestMergeId");
671 b.ToTable(
"RevInfoTestMerges");
674 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
676 b.Property<
long>(
"Id")
677 .ValueGeneratedOnAdd()
678 .HasColumnType(
"bigint");
680 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
682 b.Property<
string>(
"CommitSha")
685 .HasColumnType(
"nvarchar(40)");
687 b.Property<
long>(
"InstanceId")
688 .HasColumnType(
"bigint");
690 b.Property<
string>(
"OriginCommitSha")
693 .HasColumnType(
"nvarchar(40)");
695 b.Property<DateTimeOffset>(
"Timestamp")
696 .HasColumnType(
"datetimeoffset");
700 b.HasIndex(
"InstanceId",
"CommitSha")
703 b.ToTable(
"RevisionInformations");
706 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
708 b.Property<
long>(
"Id")
709 .ValueGeneratedOnAdd()
710 .HasColumnType(
"bigint");
712 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
714 b.Property<
string>(
"Author")
716 .HasColumnType(
"nvarchar(max)");
718 b.Property<
string>(
"BodyAtMerge")
720 .HasColumnType(
"nvarchar(max)");
722 b.Property<
string>(
"Comment")
724 .HasColumnType(
"nvarchar(max)");
726 b.Property<DateTimeOffset>(
"MergedAt")
727 .HasColumnType(
"datetimeoffset");
729 b.Property<
long>(
"MergedById")
730 .HasColumnType(
"bigint");
732 b.Property<
int>(
"Number")
733 .HasColumnType(
"int");
735 b.Property<
long?>(
"PrimaryRevisionInformationId")
737 .HasColumnType(
"bigint");
739 b.Property<
string>(
"TargetCommitSha")
742 .HasColumnType(
"nvarchar(40)");
744 b.Property<
string>(
"TitleAtMerge")
746 .HasColumnType(
"nvarchar(max)");
748 b.Property<
string>(
"Url")
750 .HasColumnType(
"nvarchar(max)");
754 b.HasIndex(
"MergedById");
756 b.HasIndex(
"PrimaryRevisionInformationId")
759 b.ToTable(
"TestMerges");
762 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
764 b.Property<
long?>(
"Id")
765 .ValueGeneratedOnAdd()
766 .HasColumnType(
"bigint");
768 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
770 b.Property<
string>(
"CanonicalName")
773 .HasColumnType(
"nvarchar(100)");
775 b.Property<DateTimeOffset?>(
"CreatedAt")
777 .HasColumnType(
"datetimeoffset");
779 b.Property<
long?>(
"CreatedById")
780 .HasColumnType(
"bigint");
782 b.Property<
bool?>(
"Enabled")
784 .HasColumnType(
"bit");
786 b.Property<
long?>(
"GroupId")
787 .HasColumnType(
"bigint");
789 b.Property<DateTimeOffset?>(
"LastPasswordUpdate")
790 .HasColumnType(
"datetimeoffset");
792 b.Property<
string>(
"Name")
795 .HasColumnType(
"nvarchar(100)");
797 b.Property<
string>(
"PasswordHash")
798 .HasColumnType(
"nvarchar(max)");
800 b.Property<
string>(
"SystemIdentifier")
802 .HasColumnType(
"nvarchar(100)");
806 b.HasIndex(
"CanonicalName")
809 b.HasIndex(
"CreatedById");
811 b.HasIndex(
"GroupId");
813 b.HasIndex(
"SystemIdentifier")
815 .HasFilter(
"[SystemIdentifier] IS NOT NULL");
820 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
822 b.Property<
long?>(
"Id")
823 .ValueGeneratedOnAdd()
824 .HasColumnType(
"bigint");
826 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
828 b.Property<
string>(
"Name")
831 .HasColumnType(
"nvarchar(100)");
841 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
843 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
844 .WithMany(
"ChatSettings")
845 .HasForeignKey(
"InstanceId")
846 .OnDelete(DeleteBehavior.Cascade)
849 b.Navigation(
"Instance");
852 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
854 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
855 .WithMany(
"Channels")
856 .HasForeignKey(
"ChatSettingsId")
857 .OnDelete(DeleteBehavior.Cascade)
860 b.Navigation(
"ChatSettings");
863 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
865 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
867 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
868 .OnDelete(DeleteBehavior.Cascade)
871 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
872 .WithMany(
"CompileJobs")
873 .HasForeignKey(
"RevisionInformationId")
874 .OnDelete(DeleteBehavior.ClientNoAction)
879 b.Navigation(
"RevisionInformation");
882 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
884 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
885 .WithOne(
"DreamDaemonSettings")
886 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
887 .OnDelete(DeleteBehavior.Cascade)
890 b.Navigation(
"Instance");
893 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
895 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
896 .WithOne(
"DreamMakerSettings")
897 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
898 .OnDelete(DeleteBehavior.Cascade)
901 b.Navigation(
"Instance");
904 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
906 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
907 .WithMany(
"InstancePermissionSets")
908 .HasForeignKey(
"InstanceId")
909 .OnDelete(DeleteBehavior.Cascade)
912 b.HasOne(
"Tgstation.Server.Host.Models.PermissionSet",
"PermissionSet")
913 .WithMany(
"InstancePermissionSets")
914 .HasForeignKey(
"PermissionSetId")
915 .OnDelete(DeleteBehavior.Cascade)
918 b.Navigation(
"Instance");
920 b.Navigation(
"PermissionSet");
923 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
925 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
927 .HasForeignKey(
"CancelledById");
929 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
931 .HasForeignKey(
"InstanceId")
932 .OnDelete(DeleteBehavior.Cascade)
935 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
937 .HasForeignKey(
"StartedById")
938 .OnDelete(DeleteBehavior.Cascade)
941 b.Navigation(
"CancelledBy");
943 b.Navigation(
"Instance");
945 b.Navigation(
"StartedBy");
948 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
950 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
951 .WithMany(
"OAuthConnections")
952 .HasForeignKey(
"UserId")
953 .OnDelete(DeleteBehavior.Cascade)
956 b.Navigation(
"User");
959 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OidcConnection", b =>
961 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
962 .WithMany(
"OidcConnections")
963 .HasForeignKey(
"UserId")
964 .OnDelete(DeleteBehavior.Cascade)
967 b.Navigation(
"User");
970 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
972 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
973 .WithOne(
"PermissionSet")
974 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"GroupId")
975 .OnDelete(DeleteBehavior.Cascade);
977 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
978 .WithOne(
"PermissionSet")
979 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"UserId")
980 .OnDelete(DeleteBehavior.Cascade);
982 b.Navigation(
"Group");
984 b.Navigation(
"User");
987 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
989 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
991 .HasForeignKey(
"CompileJobId")
992 .OnDelete(DeleteBehavior.Cascade)
995 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"InitialCompileJob")
997 .HasForeignKey(
"InitialCompileJobId");
999 b.Navigation(
"CompileJob");
1001 b.Navigation(
"InitialCompileJob");
1004 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
1006 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
1007 .WithOne(
"RepositorySettings")
1008 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
1009 .OnDelete(DeleteBehavior.Cascade)
1012 b.Navigation(
"Instance");
1015 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
1017 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
1018 .WithMany(
"ActiveTestMerges")
1019 .HasForeignKey(
"RevisionInformationId")
1020 .OnDelete(DeleteBehavior.Cascade)
1023 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
1024 .WithMany(
"RevisonInformations")
1025 .HasForeignKey(
"TestMergeId")
1026 .OnDelete(DeleteBehavior.ClientNoAction)
1029 b.Navigation(
"RevisionInformation");
1031 b.Navigation(
"TestMerge");
1034 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
1036 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
1037 .WithMany(
"RevisionInformations")
1038 .HasForeignKey(
"InstanceId")
1039 .OnDelete(DeleteBehavior.Cascade)
1042 b.Navigation(
"Instance");
1045 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
1047 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
1048 .WithMany(
"TestMerges")
1049 .HasForeignKey(
"MergedById")
1050 .OnDelete(DeleteBehavior.Restrict)
1053 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
1054 .WithOne(
"PrimaryTestMerge")
1055 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
1056 .OnDelete(DeleteBehavior.Cascade)
1059 b.Navigation(
"MergedBy");
1061 b.Navigation(
"PrimaryRevisionInformation");
1064 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
1066 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
1067 .WithMany(
"CreatedUsers")
1068 .HasForeignKey(
"CreatedById");
1070 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
1072 .HasForeignKey(
"GroupId");
1074 b.Navigation(
"CreatedBy");
1076 b.Navigation(
"Group");
1079 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
1081 b.Navigation(
"Channels");
1084 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
1086 b.Navigation(
"ChatSettings");
1088 b.Navigation(
"DreamDaemonSettings");
1090 b.Navigation(
"DreamMakerSettings");
1092 b.Navigation(
"InstancePermissionSets");
1094 b.Navigation(
"Jobs");
1096 b.Navigation(
"RepositorySettings");
1098 b.Navigation(
"RevisionInformations");
1101 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
1103 b.Navigation(
"InstancePermissionSets");
1106 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
1108 b.Navigation(
"ActiveTestMerges");
1110 b.Navigation(
"CompileJobs");
1112 b.Navigation(
"PrimaryTestMerge");
1115 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
1117 b.Navigation(
"RevisonInformations");
1120 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
1122 b.Navigation(
"CreatedUsers");
1124 b.Navigation(
"OAuthConnections");
1126 b.Navigation(
"OidcConnections");
1128 b.Navigation(
"PermissionSet");
1130 b.Navigation(
"TestMerges");
1133 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
1135 b.Navigation(
"PermissionSet")
1138 b.Navigation(
"Users");
1140#pragma warning restore 612, 618