17#pragma warning disable 612, 618
19 .HasAnnotation(
"ProductVersion",
"7.0.7")
20 .HasAnnotation(
"Relational:MaxIdentifierLength", 128);
22 SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
24 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
26 b.Property<
long?>(
"Id")
27 .ValueGeneratedOnAdd()
28 .HasColumnType(
"bigint");
30 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
32 b.Property<
int>(
"ChannelLimit")
33 .HasColumnType(
"int");
35 b.Property<
string>(
"ConnectionString")
38 .HasColumnType(
"nvarchar(max)");
40 b.Property<
bool?>(
"Enabled")
41 .HasColumnType(
"bit");
43 b.Property<
long>(
"InstanceId")
44 .HasColumnType(
"bigint");
46 b.Property<
string>(
"Name")
49 .HasColumnType(
"nvarchar(100)");
51 b.Property<
int>(
"Provider")
52 .HasColumnType(
"int");
54 b.Property<
long>(
"ReconnectionInterval")
55 .HasColumnType(
"bigint");
59 b.HasIndex(
"InstanceId",
"Name")
62 b.ToTable(
"ChatBots");
65 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
67 b.Property<
long>(
"Id")
68 .ValueGeneratedOnAdd()
69 .HasColumnType(
"bigint");
71 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
73 b.Property<
long>(
"ChatSettingsId")
74 .HasColumnType(
"bigint");
76 b.Property<decimal?>(
"DiscordChannelId")
77 .HasColumnType(
"decimal(20,0)");
79 b.Property<
string>(
"IrcChannel")
81 .HasColumnType(
"nvarchar(100)");
83 b.Property<
bool?>(
"IsAdminChannel")
85 .HasColumnType(
"bit");
87 b.Property<
bool?>(
"IsSystemChannel")
89 .HasColumnType(
"bit");
91 b.Property<
bool?>(
"IsUpdatesChannel")
93 .HasColumnType(
"bit");
95 b.Property<
bool?>(
"IsWatchdogChannel")
97 .HasColumnType(
"bit");
99 b.Property<
string>(
"Tag")
101 .HasColumnType(
"nvarchar(max)");
105 b.HasIndex(
"ChatSettingsId",
"DiscordChannelId")
107 .HasFilter(
"[DiscordChannelId] IS NOT NULL");
109 b.HasIndex(
"ChatSettingsId",
"IrcChannel")
111 .HasFilter(
"[IrcChannel] IS NOT NULL");
113 b.ToTable(
"ChatChannels");
116 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
118 b.Property<
long?>(
"Id")
119 .ValueGeneratedOnAdd()
120 .HasColumnType(
"bigint");
122 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
124 b.Property<
string>(
"ByondVersion")
126 .HasColumnType(
"nvarchar(max)");
128 b.Property<
int?>(
"DMApiMajorVersion")
129 .HasColumnType(
"int");
131 b.Property<
int?>(
"DMApiMinorVersion")
132 .HasColumnType(
"int");
134 b.Property<
int?>(
"DMApiPatchVersion")
135 .HasColumnType(
"int");
137 b.Property<Guid?>(
"DirectoryName")
139 .HasColumnType(
"uniqueidentifier");
141 b.Property<
string>(
"DmeName")
143 .HasColumnType(
"nvarchar(max)");
145 b.Property<
int?>(
"GitHubDeploymentId")
146 .HasColumnType(
"int");
148 b.Property<
long?>(
"GitHubRepoId")
149 .HasColumnType(
"bigint");
151 b.Property<
long>(
"JobId")
152 .HasColumnType(
"bigint");
154 b.Property<
int?>(
"MinimumSecurityLevel")
155 .HasColumnType(
"int");
157 b.Property<
string>(
"Output")
159 .HasColumnType(
"nvarchar(max)");
161 b.Property<
string>(
"RepositoryOrigin")
162 .HasColumnType(
"nvarchar(max)");
164 b.Property<
long>(
"RevisionInformationId")
165 .HasColumnType(
"bigint");
169 b.HasIndex(
"DirectoryName");
174 b.HasIndex(
"RevisionInformationId");
176 b.ToTable(
"CompileJobs");
179 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
181 b.Property<
long>(
"Id")
182 .ValueGeneratedOnAdd()
183 .HasColumnType(
"bigint");
185 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
187 b.Property<
string>(
"AdditionalParameters")
190 .HasColumnType(
"nvarchar(max)");
192 b.Property<
bool?>(
"AllowWebClient")
194 .HasColumnType(
"bit");
196 b.Property<
bool?>(
"AutoStart")
198 .HasColumnType(
"bit");
200 b.Property<
bool?>(
"DumpOnHealthCheckRestart")
202 .HasColumnType(
"bit");
204 b.Property<
long>(
"HealthCheckSeconds")
205 .HasColumnType(
"bigint");
207 b.Property<
long>(
"InstanceId")
208 .HasColumnType(
"bigint");
210 b.Property<
bool?>(
"LogOutput")
212 .HasColumnType(
"bit");
214 b.Property<
long>(
"MapThreads")
215 .HasColumnType(
"bigint");
217 b.Property<
int>(
"Port")
218 .HasColumnType(
"int");
220 b.Property<
int>(
"SecurityLevel")
221 .HasColumnType(
"int");
223 b.Property<
bool?>(
"StartProfiler")
225 .HasColumnType(
"bit");
227 b.Property<
long>(
"StartupTimeout")
228 .HasColumnType(
"bigint");
230 b.Property<
long>(
"TopicRequestTimeout")
231 .HasColumnType(
"bigint");
233 b.Property<
int>(
"Visibility")
234 .HasColumnType(
"int");
238 b.HasIndex(
"InstanceId")
241 b.ToTable(
"DreamDaemonSettings");
244 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
246 b.Property<
long>(
"Id")
247 .ValueGeneratedOnAdd()
248 .HasColumnType(
"bigint");
250 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
252 b.Property<
int>(
"ApiValidationPort")
253 .HasColumnType(
"int");
255 b.Property<
int>(
"ApiValidationSecurityLevel")
256 .HasColumnType(
"int");
258 b.Property<
long>(
"InstanceId")
259 .HasColumnType(
"bigint");
261 b.Property<
string>(
"ProjectName")
263 .HasColumnType(
"nvarchar(max)");
265 b.Property<
bool?>(
"RequireDMApiValidation")
267 .HasColumnType(
"bit");
269 b.Property<TimeSpan?>(
"Timeout")
271 .HasColumnType(
"time");
275 b.HasIndex(
"InstanceId")
278 b.ToTable(
"DreamMakerSettings");
281 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
283 b.Property<
long?>(
"Id")
284 .ValueGeneratedOnAdd()
285 .HasColumnType(
"bigint");
287 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
289 b.Property<
long>(
"AutoUpdateInterval")
290 .HasColumnType(
"bigint");
292 b.Property<
int>(
"ChatBotLimit")
293 .HasColumnType(
"int");
295 b.Property<
int>(
"ConfigurationType")
296 .HasColumnType(
"int");
298 b.Property<
string>(
"Name")
301 .HasColumnType(
"nvarchar(100)");
303 b.Property<
bool?>(
"Online")
305 .HasColumnType(
"bit");
307 b.Property<
string>(
"Path")
309 .HasColumnType(
"nvarchar(450)");
311 b.Property<
string>(
"SwarmIdentifer")
312 .HasColumnType(
"nvarchar(450)");
316 b.HasIndex(
"Path",
"SwarmIdentifer")
318 .HasFilter(
"[SwarmIdentifer] IS NOT NULL");
320 b.ToTable(
"Instances");
323 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
325 b.Property<
long>(
"Id")
326 .ValueGeneratedOnAdd()
327 .HasColumnType(
"bigint");
329 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
331 b.Property<decimal>(
"ByondRights")
332 .HasColumnType(
"decimal(20,0)");
334 b.Property<decimal>(
"ChatBotRights")
335 .HasColumnType(
"decimal(20,0)");
337 b.Property<decimal>(
"ConfigurationRights")
338 .HasColumnType(
"decimal(20,0)");
340 b.Property<decimal>(
"DreamDaemonRights")
341 .HasColumnType(
"decimal(20,0)");
343 b.Property<decimal>(
"DreamMakerRights")
344 .HasColumnType(
"decimal(20,0)");
346 b.Property<
long>(
"InstanceId")
347 .HasColumnType(
"bigint");
349 b.Property<decimal>(
"InstancePermissionSetRights")
350 .HasColumnType(
"decimal(20,0)");
352 b.Property<
long>(
"PermissionSetId")
353 .HasColumnType(
"bigint");
355 b.Property<decimal>(
"RepositoryRights")
356 .HasColumnType(
"decimal(20,0)");
360 b.HasIndex(
"InstanceId");
362 b.HasIndex(
"PermissionSetId",
"InstanceId")
365 b.ToTable(
"InstancePermissionSets");
368 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
370 b.Property<
long?>(
"Id")
371 .ValueGeneratedOnAdd()
372 .HasColumnType(
"bigint");
374 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
376 b.Property<decimal?>(
"CancelRight")
377 .HasColumnType(
"decimal(20,0)");
379 b.Property<decimal?>(
"CancelRightsType")
380 .HasColumnType(
"decimal(20,0)");
382 b.Property<
bool?>(
"Cancelled")
384 .HasColumnType(
"bit");
386 b.Property<
long?>(
"CancelledById")
387 .HasColumnType(
"bigint");
389 b.Property<
string>(
"Description")
391 .HasColumnType(
"nvarchar(max)");
393 b.Property<
long?>(
"ErrorCode")
394 .HasColumnType(
"bigint");
396 b.Property<
string>(
"ExceptionDetails")
397 .HasColumnType(
"nvarchar(max)");
399 b.Property<
long>(
"InstanceId")
400 .HasColumnType(
"bigint");
402 b.Property<DateTimeOffset?>(
"StartedAt")
404 .HasColumnType(
"datetimeoffset");
406 b.Property<
long>(
"StartedById")
407 .HasColumnType(
"bigint");
409 b.Property<DateTimeOffset?>(
"StoppedAt")
410 .HasColumnType(
"datetimeoffset");
414 b.HasIndex(
"CancelledById");
416 b.HasIndex(
"InstanceId");
418 b.HasIndex(
"StartedById");
423 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
425 b.Property<
long>(
"Id")
426 .ValueGeneratedOnAdd()
427 .HasColumnType(
"bigint");
429 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
431 b.Property<
string>(
"ExternalUserId")
434 .HasColumnType(
"nvarchar(100)");
436 b.Property<
int>(
"Provider")
437 .HasColumnType(
"int");
439 b.Property<
long?>(
"UserId")
440 .HasColumnType(
"bigint");
444 b.HasIndex(
"UserId");
446 b.HasIndex(
"Provider",
"ExternalUserId")
449 b.ToTable(
"OAuthConnections");
452 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
454 b.Property<
long?>(
"Id")
455 .ValueGeneratedOnAdd()
456 .HasColumnType(
"bigint");
458 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
460 b.Property<decimal>(
"AdministrationRights")
461 .HasColumnType(
"decimal(20,0)");
463 b.Property<
long?>(
"GroupId")
464 .HasColumnType(
"bigint");
466 b.Property<decimal>(
"InstanceManagerRights")
467 .HasColumnType(
"decimal(20,0)");
469 b.Property<
long?>(
"UserId")
470 .HasColumnType(
"bigint");
474 b.HasIndex(
"GroupId")
476 .HasFilter(
"[GroupId] IS NOT NULL");
480 .HasFilter(
"[UserId] IS NOT NULL");
482 b.ToTable(
"PermissionSets");
485 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
487 b.Property<
long>(
"Id")
488 .ValueGeneratedOnAdd()
489 .HasColumnType(
"bigint");
491 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
493 b.Property<
string>(
"AccessIdentifier")
495 .HasColumnType(
"nvarchar(max)");
497 b.Property<
long>(
"CompileJobId")
498 .HasColumnType(
"bigint");
500 b.Property<
long?>(
"InitialCompileJobId")
501 .HasColumnType(
"bigint");
503 b.Property<
int>(
"LaunchSecurityLevel")
504 .HasColumnType(
"int");
506 b.Property<
int>(
"LaunchVisibility")
507 .HasColumnType(
"int");
509 b.Property<
int>(
"Port")
510 .HasColumnType(
"int");
512 b.Property<
int>(
"ProcessId")
513 .HasColumnType(
"int");
515 b.Property<
int>(
"RebootState")
516 .HasColumnType(
"int");
520 b.HasIndex(
"CompileJobId");
522 b.HasIndex(
"InitialCompileJobId");
524 b.ToTable(
"ReattachInformations");
527 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
529 b.Property<
long>(
"Id")
530 .ValueGeneratedOnAdd()
531 .HasColumnType(
"bigint");
533 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
535 b.Property<
string>(
"AccessToken")
537 .HasColumnType(
"nvarchar(max)");
539 b.Property<
string>(
"AccessUser")
541 .HasColumnType(
"nvarchar(max)");
543 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
545 .HasColumnType(
"bit");
547 b.Property<
bool?>(
"AutoUpdatesSynchronize")
549 .HasColumnType(
"bit");
551 b.Property<
string>(
"CommitterEmail")
554 .HasColumnType(
"nvarchar(max)");
556 b.Property<
string>(
"CommitterName")
559 .HasColumnType(
"nvarchar(max)");
561 b.Property<
bool?>(
"CreateGitHubDeployments")
563 .HasColumnType(
"bit");
565 b.Property<
long>(
"InstanceId")
566 .HasColumnType(
"bigint");
568 b.Property<
bool?>(
"PostTestMergeComment")
570 .HasColumnType(
"bit");
572 b.Property<
bool?>(
"PushTestMergeCommits")
574 .HasColumnType(
"bit");
576 b.Property<
bool?>(
"ShowTestMergeCommitters")
578 .HasColumnType(
"bit");
580 b.Property<
bool?>(
"UpdateSubmodules")
582 .HasColumnType(
"bit");
586 b.HasIndex(
"InstanceId")
589 b.ToTable(
"RepositorySettings");
592 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
594 b.Property<
long>(
"Id")
595 .ValueGeneratedOnAdd()
596 .HasColumnType(
"bigint");
598 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
600 b.Property<
long>(
"RevisionInformationId")
601 .HasColumnType(
"bigint");
603 b.Property<
long>(
"TestMergeId")
604 .HasColumnType(
"bigint");
608 b.HasIndex(
"RevisionInformationId");
610 b.HasIndex(
"TestMergeId");
612 b.ToTable(
"RevInfoTestMerges");
615 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
617 b.Property<
long>(
"Id")
618 .ValueGeneratedOnAdd()
619 .HasColumnType(
"bigint");
621 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
623 b.Property<
string>(
"CommitSha")
626 .HasColumnType(
"nvarchar(40)");
628 b.Property<
long>(
"InstanceId")
629 .HasColumnType(
"bigint");
631 b.Property<
string>(
"OriginCommitSha")
634 .HasColumnType(
"nvarchar(40)");
636 b.Property<DateTimeOffset>(
"Timestamp")
637 .HasColumnType(
"datetimeoffset");
641 b.HasIndex(
"InstanceId",
"CommitSha")
644 b.ToTable(
"RevisionInformations");
647 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
649 b.Property<
long>(
"Id")
650 .ValueGeneratedOnAdd()
651 .HasColumnType(
"bigint");
653 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
655 b.Property<
string>(
"Author")
657 .HasColumnType(
"nvarchar(max)");
659 b.Property<
string>(
"BodyAtMerge")
661 .HasColumnType(
"nvarchar(max)");
663 b.Property<
string>(
"Comment")
665 .HasColumnType(
"nvarchar(max)");
667 b.Property<DateTimeOffset>(
"MergedAt")
668 .HasColumnType(
"datetimeoffset");
670 b.Property<
long>(
"MergedById")
671 .HasColumnType(
"bigint");
673 b.Property<
int>(
"Number")
674 .HasColumnType(
"int");
676 b.Property<
long?>(
"PrimaryRevisionInformationId")
678 .HasColumnType(
"bigint");
680 b.Property<
string>(
"TargetCommitSha")
683 .HasColumnType(
"nvarchar(40)");
685 b.Property<
string>(
"TitleAtMerge")
687 .HasColumnType(
"nvarchar(max)");
689 b.Property<
string>(
"Url")
691 .HasColumnType(
"nvarchar(max)");
695 b.HasIndex(
"MergedById");
697 b.HasIndex(
"PrimaryRevisionInformationId")
700 b.ToTable(
"TestMerges");
703 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
705 b.Property<
long?>(
"Id")
706 .ValueGeneratedOnAdd()
707 .HasColumnType(
"bigint");
709 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
711 b.Property<
string>(
"CanonicalName")
714 .HasColumnType(
"nvarchar(100)");
716 b.Property<DateTimeOffset?>(
"CreatedAt")
718 .HasColumnType(
"datetimeoffset");
720 b.Property<
long?>(
"CreatedById")
721 .HasColumnType(
"bigint");
723 b.Property<
bool?>(
"Enabled")
725 .HasColumnType(
"bit");
727 b.Property<
long?>(
"GroupId")
728 .HasColumnType(
"bigint");
730 b.Property<DateTimeOffset?>(
"LastPasswordUpdate")
731 .HasColumnType(
"datetimeoffset");
733 b.Property<
string>(
"Name")
736 .HasColumnType(
"nvarchar(100)");
738 b.Property<
string>(
"PasswordHash")
739 .HasColumnType(
"nvarchar(max)");
741 b.Property<
string>(
"SystemIdentifier")
743 .HasColumnType(
"nvarchar(100)");
747 b.HasIndex(
"CanonicalName")
750 b.HasIndex(
"CreatedById");
752 b.HasIndex(
"GroupId");
754 b.HasIndex(
"SystemIdentifier")
756 .HasFilter(
"[SystemIdentifier] IS NOT NULL");
761 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
763 b.Property<
long?>(
"Id")
764 .ValueGeneratedOnAdd()
765 .HasColumnType(
"bigint");
767 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
769 b.Property<
string>(
"Name")
772 .HasColumnType(
"nvarchar(100)");
782 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
784 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
785 .WithMany(
"ChatSettings")
786 .HasForeignKey(
"InstanceId")
787 .OnDelete(DeleteBehavior.Cascade)
790 b.Navigation(
"Instance");
793 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
795 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
796 .WithMany(
"Channels")
797 .HasForeignKey(
"ChatSettingsId")
798 .OnDelete(DeleteBehavior.Cascade)
801 b.Navigation(
"ChatSettings");
804 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
806 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
808 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
809 .OnDelete(DeleteBehavior.Cascade)
812 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
813 .WithMany(
"CompileJobs")
814 .HasForeignKey(
"RevisionInformationId")
815 .OnDelete(DeleteBehavior.ClientNoAction)
820 b.Navigation(
"RevisionInformation");
823 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
825 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
826 .WithOne(
"DreamDaemonSettings")
827 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
828 .OnDelete(DeleteBehavior.Cascade)
831 b.Navigation(
"Instance");
834 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
836 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
837 .WithOne(
"DreamMakerSettings")
838 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
839 .OnDelete(DeleteBehavior.Cascade)
842 b.Navigation(
"Instance");
845 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
847 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
848 .WithMany(
"InstancePermissionSets")
849 .HasForeignKey(
"InstanceId")
850 .OnDelete(DeleteBehavior.Cascade)
853 b.HasOne(
"Tgstation.Server.Host.Models.PermissionSet",
"PermissionSet")
854 .WithMany(
"InstancePermissionSets")
855 .HasForeignKey(
"PermissionSetId")
856 .OnDelete(DeleteBehavior.Cascade)
859 b.Navigation(
"Instance");
861 b.Navigation(
"PermissionSet");
864 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
866 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
868 .HasForeignKey(
"CancelledById");
870 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
872 .HasForeignKey(
"InstanceId")
873 .OnDelete(DeleteBehavior.Cascade)
876 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
878 .HasForeignKey(
"StartedById")
879 .OnDelete(DeleteBehavior.Cascade)
882 b.Navigation(
"CancelledBy");
884 b.Navigation(
"Instance");
886 b.Navigation(
"StartedBy");
889 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
891 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
892 .WithMany(
"OAuthConnections")
893 .HasForeignKey(
"UserId")
894 .OnDelete(DeleteBehavior.Cascade);
896 b.Navigation(
"User");
899 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
901 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
902 .WithOne(
"PermissionSet")
903 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"GroupId")
904 .OnDelete(DeleteBehavior.Cascade);
906 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
907 .WithOne(
"PermissionSet")
908 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"UserId")
909 .OnDelete(DeleteBehavior.Cascade);
911 b.Navigation(
"Group");
913 b.Navigation(
"User");
916 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
918 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
920 .HasForeignKey(
"CompileJobId")
921 .OnDelete(DeleteBehavior.Cascade)
924 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"InitialCompileJob")
926 .HasForeignKey(
"InitialCompileJobId");
928 b.Navigation(
"CompileJob");
930 b.Navigation(
"InitialCompileJob");
933 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
935 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
936 .WithOne(
"RepositorySettings")
937 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
938 .OnDelete(DeleteBehavior.Cascade)
941 b.Navigation(
"Instance");
944 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
946 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
947 .WithMany(
"ActiveTestMerges")
948 .HasForeignKey(
"RevisionInformationId")
949 .OnDelete(DeleteBehavior.Cascade)
952 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
953 .WithMany(
"RevisonInformations")
954 .HasForeignKey(
"TestMergeId")
955 .OnDelete(DeleteBehavior.ClientNoAction)
958 b.Navigation(
"RevisionInformation");
960 b.Navigation(
"TestMerge");
963 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
965 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
966 .WithMany(
"RevisionInformations")
967 .HasForeignKey(
"InstanceId")
968 .OnDelete(DeleteBehavior.Cascade)
971 b.Navigation(
"Instance");
974 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
976 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
977 .WithMany(
"TestMerges")
978 .HasForeignKey(
"MergedById")
979 .OnDelete(DeleteBehavior.Restrict)
982 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
983 .WithOne(
"PrimaryTestMerge")
984 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
985 .OnDelete(DeleteBehavior.Cascade)
988 b.Navigation(
"MergedBy");
990 b.Navigation(
"PrimaryRevisionInformation");
993 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
995 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
996 .WithMany(
"CreatedUsers")
997 .HasForeignKey(
"CreatedById");
999 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
1001 .HasForeignKey(
"GroupId");
1003 b.Navigation(
"CreatedBy");
1005 b.Navigation(
"Group");
1008 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
1010 b.Navigation(
"Channels");
1013 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
1015 b.Navigation(
"ChatSettings");
1017 b.Navigation(
"DreamDaemonSettings");
1019 b.Navigation(
"DreamMakerSettings");
1021 b.Navigation(
"InstancePermissionSets");
1023 b.Navigation(
"Jobs");
1025 b.Navigation(
"RepositorySettings");
1027 b.Navigation(
"RevisionInformations");
1030 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
1032 b.Navigation(
"InstancePermissionSets");
1035 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
1037 b.Navigation(
"ActiveTestMerges");
1039 b.Navigation(
"CompileJobs");
1041 b.Navigation(
"PrimaryTestMerge");
1044 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
1046 b.Navigation(
"RevisonInformations");
1049 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
1051 b.Navigation(
"CreatedUsers");
1053 b.Navigation(
"OAuthConnections");
1055 b.Navigation(
"PermissionSet");
1057 b.Navigation(
"TestMerges");
1060 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
1062 b.Navigation(
"PermissionSet")
1065 b.Navigation(
"Users");
1067#pragma warning restore 612, 618