17#pragma warning disable 612, 618
19 .HasAnnotation(
"ProductVersion",
"8.0.6")
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<
int?>(
"DMApiMajorVersion")
125 .HasColumnType(
"int");
127 b.Property<
int?>(
"DMApiMinorVersion")
128 .HasColumnType(
"int");
130 b.Property<
int?>(
"DMApiPatchVersion")
131 .HasColumnType(
"int");
133 b.Property<Guid?>(
"DirectoryName")
135 .HasColumnType(
"uniqueidentifier");
137 b.Property<
string>(
"DmeName")
139 .HasColumnType(
"nvarchar(max)");
141 b.Property<
string>(
"EngineVersion")
143 .HasColumnType(
"nvarchar(max)");
145 b.Property<
long?>(
"GitHubDeploymentId")
146 .HasColumnType(
"bigint");
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<
bool?>(
"Minidumps")
219 .HasColumnType(
"bit");
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<
long>(
"InstanceId")
267 .HasColumnType(
"bigint");
269 b.Property<
string>(
"ProjectName")
271 .HasColumnType(
"nvarchar(max)");
273 b.Property<
bool?>(
"RequireDMApiValidation")
275 .HasColumnType(
"bit");
277 b.Property<TimeSpan?>(
"Timeout")
279 .HasColumnType(
"time");
283 b.HasIndex(
"InstanceId")
286 b.ToTable(
"DreamMakerSettings");
289 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
291 b.Property<
long?>(
"Id")
292 .ValueGeneratedOnAdd()
293 .HasColumnType(
"bigint");
295 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
297 b.Property<
string>(
"AutoUpdateCron")
300 .HasColumnType(
"nvarchar(max)");
302 b.Property<
long>(
"AutoUpdateInterval")
303 .HasColumnType(
"bigint");
305 b.Property<
int>(
"ChatBotLimit")
306 .HasColumnType(
"int");
308 b.Property<
int>(
"ConfigurationType")
309 .HasColumnType(
"int");
311 b.Property<
string>(
"Name")
314 .HasColumnType(
"nvarchar(100)");
316 b.Property<
bool?>(
"Online")
318 .HasColumnType(
"bit");
320 b.Property<
string>(
"Path")
322 .HasColumnType(
"nvarchar(450)");
324 b.Property<
string>(
"SwarmIdentifer")
325 .HasColumnType(
"nvarchar(450)");
329 b.HasIndex(
"Path",
"SwarmIdentifer")
331 .HasFilter(
"[SwarmIdentifer] IS NOT NULL");
333 b.ToTable(
"Instances");
336 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
338 b.Property<
long>(
"Id")
339 .ValueGeneratedOnAdd()
340 .HasColumnType(
"bigint");
342 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
344 b.Property<decimal>(
"ChatBotRights")
345 .HasColumnType(
"decimal(20,0)");
347 b.Property<decimal>(
"ConfigurationRights")
348 .HasColumnType(
"decimal(20,0)");
350 b.Property<decimal>(
"DreamDaemonRights")
351 .HasColumnType(
"decimal(20,0)");
353 b.Property<decimal>(
"DreamMakerRights")
354 .HasColumnType(
"decimal(20,0)");
356 b.Property<decimal>(
"EngineRights")
357 .HasColumnType(
"decimal(20,0)");
359 b.Property<
long>(
"InstanceId")
360 .HasColumnType(
"bigint");
362 b.Property<decimal>(
"InstancePermissionSetRights")
363 .HasColumnType(
"decimal(20,0)");
365 b.Property<
long>(
"PermissionSetId")
366 .HasColumnType(
"bigint");
368 b.Property<decimal>(
"RepositoryRights")
369 .HasColumnType(
"decimal(20,0)");
373 b.HasIndex(
"InstanceId");
375 b.HasIndex(
"PermissionSetId",
"InstanceId")
378 b.ToTable(
"InstancePermissionSets");
381 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
383 b.Property<
long?>(
"Id")
384 .ValueGeneratedOnAdd()
385 .HasColumnType(
"bigint");
387 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
389 b.Property<decimal?>(
"CancelRight")
390 .HasColumnType(
"decimal(20,0)");
392 b.Property<decimal?>(
"CancelRightsType")
393 .HasColumnType(
"decimal(20,0)");
395 b.Property<
bool?>(
"Cancelled")
397 .HasColumnType(
"bit");
399 b.Property<
long?>(
"CancelledById")
400 .HasColumnType(
"bigint");
402 b.Property<
string>(
"Description")
404 .HasColumnType(
"nvarchar(max)");
406 b.Property<
long?>(
"ErrorCode")
407 .HasColumnType(
"bigint");
409 b.Property<
string>(
"ExceptionDetails")
410 .HasColumnType(
"nvarchar(max)");
412 b.Property<
long>(
"InstanceId")
413 .HasColumnType(
"bigint");
415 b.Property<
byte>(
"JobCode")
416 .HasColumnType(
"tinyint");
418 b.Property<DateTimeOffset?>(
"StartedAt")
420 .HasColumnType(
"datetimeoffset");
422 b.Property<
long>(
"StartedById")
423 .HasColumnType(
"bigint");
425 b.Property<DateTimeOffset?>(
"StoppedAt")
426 .HasColumnType(
"datetimeoffset");
430 b.HasIndex(
"CancelledById");
432 b.HasIndex(
"InstanceId");
434 b.HasIndex(
"StartedById");
439 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
441 b.Property<
long>(
"Id")
442 .ValueGeneratedOnAdd()
443 .HasColumnType(
"bigint");
445 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
447 b.Property<
string>(
"ExternalUserId")
450 .HasColumnType(
"nvarchar(100)");
452 b.Property<
int>(
"Provider")
453 .HasColumnType(
"int");
455 b.Property<
long?>(
"UserId")
456 .HasColumnType(
"bigint");
460 b.HasIndex(
"UserId");
462 b.HasIndex(
"Provider",
"ExternalUserId")
465 b.ToTable(
"OAuthConnections");
468 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
470 b.Property<
long?>(
"Id")
471 .ValueGeneratedOnAdd()
472 .HasColumnType(
"bigint");
474 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
476 b.Property<decimal>(
"AdministrationRights")
477 .HasColumnType(
"decimal(20,0)");
479 b.Property<
long?>(
"GroupId")
480 .HasColumnType(
"bigint");
482 b.Property<decimal>(
"InstanceManagerRights")
483 .HasColumnType(
"decimal(20,0)");
485 b.Property<
long?>(
"UserId")
486 .HasColumnType(
"bigint");
490 b.HasIndex(
"GroupId")
492 .HasFilter(
"[GroupId] IS NOT NULL");
496 .HasFilter(
"[UserId] IS NOT NULL");
498 b.ToTable(
"PermissionSets");
501 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
503 b.Property<
long?>(
"Id")
504 .ValueGeneratedOnAdd()
505 .HasColumnType(
"bigint");
507 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
509 b.Property<
string>(
"AccessIdentifier")
511 .HasColumnType(
"nvarchar(max)");
513 b.Property<
long>(
"CompileJobId")
514 .HasColumnType(
"bigint");
516 b.Property<
long?>(
"InitialCompileJobId")
517 .HasColumnType(
"bigint");
519 b.Property<
int>(
"LaunchSecurityLevel")
520 .HasColumnType(
"int");
522 b.Property<
int>(
"LaunchVisibility")
523 .HasColumnType(
"int");
525 b.Property<
int>(
"Port")
526 .HasColumnType(
"int");
528 b.Property<
int>(
"ProcessId")
529 .HasColumnType(
"int");
531 b.Property<
int>(
"RebootState")
532 .HasColumnType(
"int");
534 b.Property<
int?>(
"TopicPort")
535 .HasColumnType(
"int");
539 b.HasIndex(
"CompileJobId");
541 b.HasIndex(
"InitialCompileJobId");
543 b.ToTable(
"ReattachInformations");
546 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
548 b.Property<
long>(
"Id")
549 .ValueGeneratedOnAdd()
550 .HasColumnType(
"bigint");
552 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
554 b.Property<
string>(
"AccessToken")
556 .HasColumnType(
"nvarchar(max)");
558 b.Property<
string>(
"AccessUser")
560 .HasColumnType(
"nvarchar(max)");
562 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
564 .HasColumnType(
"bit");
566 b.Property<
bool?>(
"AutoUpdatesSynchronize")
568 .HasColumnType(
"bit");
570 b.Property<
string>(
"CommitterEmail")
573 .HasColumnType(
"nvarchar(max)");
575 b.Property<
string>(
"CommitterName")
578 .HasColumnType(
"nvarchar(max)");
580 b.Property<
bool?>(
"CreateGitHubDeployments")
582 .HasColumnType(
"bit");
584 b.Property<
long>(
"InstanceId")
585 .HasColumnType(
"bigint");
587 b.Property<
bool?>(
"PostTestMergeComment")
589 .HasColumnType(
"bit");
591 b.Property<
bool?>(
"PushTestMergeCommits")
593 .HasColumnType(
"bit");
595 b.Property<
bool?>(
"ShowTestMergeCommitters")
597 .HasColumnType(
"bit");
599 b.Property<
bool?>(
"UpdateSubmodules")
601 .HasColumnType(
"bit");
605 b.HasIndex(
"InstanceId")
608 b.ToTable(
"RepositorySettings");
611 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
613 b.Property<
long>(
"Id")
614 .ValueGeneratedOnAdd()
615 .HasColumnType(
"bigint");
617 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
619 b.Property<
long>(
"RevisionInformationId")
620 .HasColumnType(
"bigint");
622 b.Property<
long>(
"TestMergeId")
623 .HasColumnType(
"bigint");
627 b.HasIndex(
"RevisionInformationId");
629 b.HasIndex(
"TestMergeId");
631 b.ToTable(
"RevInfoTestMerges");
634 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
636 b.Property<
long>(
"Id")
637 .ValueGeneratedOnAdd()
638 .HasColumnType(
"bigint");
640 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
642 b.Property<
string>(
"CommitSha")
645 .HasColumnType(
"nvarchar(40)");
647 b.Property<
long>(
"InstanceId")
648 .HasColumnType(
"bigint");
650 b.Property<
string>(
"OriginCommitSha")
653 .HasColumnType(
"nvarchar(40)");
655 b.Property<DateTimeOffset>(
"Timestamp")
656 .HasColumnType(
"datetimeoffset");
660 b.HasIndex(
"InstanceId",
"CommitSha")
663 b.ToTable(
"RevisionInformations");
666 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
668 b.Property<
long>(
"Id")
669 .ValueGeneratedOnAdd()
670 .HasColumnType(
"bigint");
672 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
674 b.Property<
string>(
"Author")
676 .HasColumnType(
"nvarchar(max)");
678 b.Property<
string>(
"BodyAtMerge")
680 .HasColumnType(
"nvarchar(max)");
682 b.Property<
string>(
"Comment")
684 .HasColumnType(
"nvarchar(max)");
686 b.Property<DateTimeOffset>(
"MergedAt")
687 .HasColumnType(
"datetimeoffset");
689 b.Property<
long>(
"MergedById")
690 .HasColumnType(
"bigint");
692 b.Property<
int>(
"Number")
693 .HasColumnType(
"int");
695 b.Property<
long?>(
"PrimaryRevisionInformationId")
697 .HasColumnType(
"bigint");
699 b.Property<
string>(
"TargetCommitSha")
702 .HasColumnType(
"nvarchar(40)");
704 b.Property<
string>(
"TitleAtMerge")
706 .HasColumnType(
"nvarchar(max)");
708 b.Property<
string>(
"Url")
710 .HasColumnType(
"nvarchar(max)");
714 b.HasIndex(
"MergedById");
716 b.HasIndex(
"PrimaryRevisionInformationId")
719 b.ToTable(
"TestMerges");
722 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
724 b.Property<
long?>(
"Id")
725 .ValueGeneratedOnAdd()
726 .HasColumnType(
"bigint");
728 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
730 b.Property<
string>(
"CanonicalName")
733 .HasColumnType(
"nvarchar(100)");
735 b.Property<DateTimeOffset?>(
"CreatedAt")
737 .HasColumnType(
"datetimeoffset");
739 b.Property<
long?>(
"CreatedById")
740 .HasColumnType(
"bigint");
742 b.Property<
bool?>(
"Enabled")
744 .HasColumnType(
"bit");
746 b.Property<
long?>(
"GroupId")
747 .HasColumnType(
"bigint");
749 b.Property<DateTimeOffset?>(
"LastPasswordUpdate")
750 .HasColumnType(
"datetimeoffset");
752 b.Property<
string>(
"Name")
755 .HasColumnType(
"nvarchar(100)");
757 b.Property<
string>(
"PasswordHash")
758 .HasColumnType(
"nvarchar(max)");
760 b.Property<
string>(
"SystemIdentifier")
762 .HasColumnType(
"nvarchar(100)");
766 b.HasIndex(
"CanonicalName")
769 b.HasIndex(
"CreatedById");
771 b.HasIndex(
"GroupId");
773 b.HasIndex(
"SystemIdentifier")
775 .HasFilter(
"[SystemIdentifier] IS NOT NULL");
780 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
782 b.Property<
long?>(
"Id")
783 .ValueGeneratedOnAdd()
784 .HasColumnType(
"bigint");
786 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
788 b.Property<
string>(
"Name")
791 .HasColumnType(
"nvarchar(100)");
801 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
803 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
804 .WithMany(
"ChatSettings")
805 .HasForeignKey(
"InstanceId")
806 .OnDelete(DeleteBehavior.Cascade)
809 b.Navigation(
"Instance");
812 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
814 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
815 .WithMany(
"Channels")
816 .HasForeignKey(
"ChatSettingsId")
817 .OnDelete(DeleteBehavior.Cascade)
820 b.Navigation(
"ChatSettings");
823 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
825 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
827 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
828 .OnDelete(DeleteBehavior.Cascade)
831 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
832 .WithMany(
"CompileJobs")
833 .HasForeignKey(
"RevisionInformationId")
834 .OnDelete(DeleteBehavior.ClientNoAction)
839 b.Navigation(
"RevisionInformation");
842 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
844 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
845 .WithOne(
"DreamDaemonSettings")
846 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
847 .OnDelete(DeleteBehavior.Cascade)
850 b.Navigation(
"Instance");
853 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
855 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
856 .WithOne(
"DreamMakerSettings")
857 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
858 .OnDelete(DeleteBehavior.Cascade)
861 b.Navigation(
"Instance");
864 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
866 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
867 .WithMany(
"InstancePermissionSets")
868 .HasForeignKey(
"InstanceId")
869 .OnDelete(DeleteBehavior.Cascade)
872 b.HasOne(
"Tgstation.Server.Host.Models.PermissionSet",
"PermissionSet")
873 .WithMany(
"InstancePermissionSets")
874 .HasForeignKey(
"PermissionSetId")
875 .OnDelete(DeleteBehavior.Cascade)
878 b.Navigation(
"Instance");
880 b.Navigation(
"PermissionSet");
883 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
885 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
887 .HasForeignKey(
"CancelledById");
889 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
891 .HasForeignKey(
"InstanceId")
892 .OnDelete(DeleteBehavior.Cascade)
895 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
897 .HasForeignKey(
"StartedById")
898 .OnDelete(DeleteBehavior.Cascade)
901 b.Navigation(
"CancelledBy");
903 b.Navigation(
"Instance");
905 b.Navigation(
"StartedBy");
908 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
910 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
911 .WithMany(
"OAuthConnections")
912 .HasForeignKey(
"UserId")
913 .OnDelete(DeleteBehavior.Cascade);
915 b.Navigation(
"User");
918 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
920 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
921 .WithOne(
"PermissionSet")
922 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"GroupId")
923 .OnDelete(DeleteBehavior.Cascade);
925 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
926 .WithOne(
"PermissionSet")
927 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"UserId")
928 .OnDelete(DeleteBehavior.Cascade);
930 b.Navigation(
"Group");
932 b.Navigation(
"User");
935 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
937 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
939 .HasForeignKey(
"CompileJobId")
940 .OnDelete(DeleteBehavior.Cascade)
943 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"InitialCompileJob")
945 .HasForeignKey(
"InitialCompileJobId");
947 b.Navigation(
"CompileJob");
949 b.Navigation(
"InitialCompileJob");
952 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
954 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
955 .WithOne(
"RepositorySettings")
956 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
957 .OnDelete(DeleteBehavior.Cascade)
960 b.Navigation(
"Instance");
963 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
965 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
966 .WithMany(
"ActiveTestMerges")
967 .HasForeignKey(
"RevisionInformationId")
968 .OnDelete(DeleteBehavior.Cascade)
971 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
972 .WithMany(
"RevisonInformations")
973 .HasForeignKey(
"TestMergeId")
974 .OnDelete(DeleteBehavior.ClientNoAction)
977 b.Navigation(
"RevisionInformation");
979 b.Navigation(
"TestMerge");
982 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
984 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
985 .WithMany(
"RevisionInformations")
986 .HasForeignKey(
"InstanceId")
987 .OnDelete(DeleteBehavior.Cascade)
990 b.Navigation(
"Instance");
993 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
995 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
996 .WithMany(
"TestMerges")
997 .HasForeignKey(
"MergedById")
998 .OnDelete(DeleteBehavior.Restrict)
1001 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
1002 .WithOne(
"PrimaryTestMerge")
1003 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
1004 .OnDelete(DeleteBehavior.Cascade)
1007 b.Navigation(
"MergedBy");
1009 b.Navigation(
"PrimaryRevisionInformation");
1012 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
1014 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
1015 .WithMany(
"CreatedUsers")
1016 .HasForeignKey(
"CreatedById");
1018 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
1020 .HasForeignKey(
"GroupId");
1022 b.Navigation(
"CreatedBy");
1024 b.Navigation(
"Group");
1027 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
1029 b.Navigation(
"Channels");
1032 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
1034 b.Navigation(
"ChatSettings");
1036 b.Navigation(
"DreamDaemonSettings");
1038 b.Navigation(
"DreamMakerSettings");
1040 b.Navigation(
"InstancePermissionSets");
1042 b.Navigation(
"Jobs");
1044 b.Navigation(
"RepositorySettings");
1046 b.Navigation(
"RevisionInformations");
1049 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
1051 b.Navigation(
"InstancePermissionSets");
1054 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
1056 b.Navigation(
"ActiveTestMerges");
1058 b.Navigation(
"CompileJobs");
1060 b.Navigation(
"PrimaryTestMerge");
1063 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
1065 b.Navigation(
"RevisonInformations");
1068 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
1070 b.Navigation(
"CreatedUsers");
1072 b.Navigation(
"OAuthConnections");
1074 b.Navigation(
"PermissionSet");
1076 b.Navigation(
"TestMerges");
1079 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
1081 b.Navigation(
"PermissionSet")
1084 b.Navigation(
"Users");
1086#pragma warning restore 612, 618