18#pragma warning disable 612, 618
20 .HasAnnotation(
"Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn)
21 .HasAnnotation(
"ProductVersion",
"3.1.20")
22 .HasAnnotation(
"Relational:MaxIdentifierLength", 63);
24 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
26 b.Property<
long?>(
"Id")
27 .ValueGeneratedOnAdd()
28 .HasColumnType(
"bigint")
29 .HasAnnotation(
"Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
31 b.Property<
int>(
"ChannelLimit")
32 .HasColumnType(
"integer");
34 b.Property<
string>(
"ConnectionString")
36 .HasColumnType(
"character varying(10000)")
39 b.Property<
bool?>(
"Enabled")
40 .HasColumnType(
"boolean");
42 b.Property<
long>(
"InstanceId")
43 .HasColumnType(
"bigint");
45 b.Property<
string>(
"Name")
47 .HasColumnType(
"character varying(100)")
50 b.Property<
int>(
"Provider")
51 .HasColumnType(
"integer");
53 b.Property<
long>(
"ReconnectionInterval")
54 .HasColumnType(
"bigint");
58 b.HasIndex(
"InstanceId",
"Name")
61 b.ToTable(
"ChatBots");
64 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
66 b.Property<
long>(
"Id")
67 .ValueGeneratedOnAdd()
68 .HasColumnType(
"bigint")
69 .HasAnnotation(
"Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
71 b.Property<
long>(
"ChatSettingsId")
72 .HasColumnType(
"bigint");
74 b.Property<decimal?>(
"DiscordChannelId")
75 .HasColumnType(
"numeric(20,0)");
77 b.Property<
string>(
"IrcChannel")
78 .HasColumnType(
"character varying(100)")
81 b.Property<
bool?>(
"IsAdminChannel")
83 .HasColumnType(
"boolean");
85 b.Property<
bool?>(
"IsUpdatesChannel")
87 .HasColumnType(
"boolean");
89 b.Property<
bool?>(
"IsWatchdogChannel")
91 .HasColumnType(
"boolean");
93 b.Property<
string>(
"Tag")
94 .HasColumnType(
"character varying(10000)")
99 b.HasIndex(
"ChatSettingsId",
"DiscordChannelId")
102 b.HasIndex(
"ChatSettingsId",
"IrcChannel")
105 b.ToTable(
"ChatChannels");
108 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
110 b.Property<
long?>(
"Id")
111 .ValueGeneratedOnAdd()
112 .HasColumnType(
"bigint")
113 .HasAnnotation(
"Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
115 b.Property<
string>(
"ByondVersion")
117 .HasColumnType(
"text");
119 b.Property<
int?>(
"DMApiMajorVersion")
120 .HasColumnType(
"integer");
122 b.Property<
int?>(
"DMApiMinorVersion")
123 .HasColumnType(
"integer");
125 b.Property<
int?>(
"DMApiPatchVersion")
126 .HasColumnType(
"integer");
128 b.Property<Guid?>(
"DirectoryName")
130 .HasColumnType(
"uuid");
132 b.Property<
string>(
"DmeName")
134 .HasColumnType(
"text");
136 b.Property<
int?>(
"GitHubDeploymentId")
137 .HasColumnType(
"integer");
139 b.Property<
long?>(
"GitHubRepoId")
140 .HasColumnType(
"bigint");
142 b.Property<
long>(
"JobId")
143 .HasColumnType(
"bigint");
145 b.Property<
int?>(
"MinimumSecurityLevel")
146 .HasColumnType(
"integer");
148 b.Property<
string>(
"Output")
150 .HasColumnType(
"text");
152 b.Property<
string>(
"RepositoryOrigin")
153 .HasColumnType(
"text");
155 b.Property<
long>(
"RevisionInformationId")
156 .HasColumnType(
"bigint");
160 b.HasIndex(
"DirectoryName");
165 b.HasIndex(
"RevisionInformationId");
167 b.ToTable(
"CompileJobs");
170 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
172 b.Property<
long>(
"Id")
173 .ValueGeneratedOnAdd()
174 .HasColumnType(
"bigint")
175 .HasAnnotation(
"Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
177 b.Property<
string>(
"AdditionalParameters")
179 .HasColumnType(
"character varying(10000)")
180 .HasMaxLength(10000);
182 b.Property<
bool?>(
"AllowWebClient")
184 .HasColumnType(
"boolean");
186 b.Property<
bool?>(
"AutoStart")
188 .HasColumnType(
"boolean");
190 b.Property<
bool?>(
"DumpOnHeartbeatRestart")
192 .HasColumnType(
"boolean");
194 b.Property<
long>(
"HeartbeatSeconds")
195 .HasColumnType(
"bigint");
197 b.Property<
long>(
"InstanceId")
198 .HasColumnType(
"bigint");
200 b.Property<
int>(
"Port")
201 .HasColumnType(
"integer");
203 b.Property<
int>(
"SecurityLevel")
204 .HasColumnType(
"integer");
206 b.Property<
bool?>(
"StartProfiler")
208 .HasColumnType(
"boolean");
210 b.Property<
long>(
"StartupTimeout")
211 .HasColumnType(
"bigint");
213 b.Property<
long>(
"TopicRequestTimeout")
214 .HasColumnType(
"bigint");
216 b.Property<
int>(
"Visibility")
217 .HasColumnType(
"integer");
221 b.HasIndex(
"InstanceId")
224 b.ToTable(
"DreamDaemonSettings");
227 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
229 b.Property<
long>(
"Id")
230 .ValueGeneratedOnAdd()
231 .HasColumnType(
"bigint")
232 .HasAnnotation(
"Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
234 b.Property<
int>(
"ApiValidationPort")
235 .HasColumnType(
"integer");
237 b.Property<
int>(
"ApiValidationSecurityLevel")
238 .HasColumnType(
"integer");
240 b.Property<
long>(
"InstanceId")
241 .HasColumnType(
"bigint");
243 b.Property<
string>(
"ProjectName")
244 .HasColumnType(
"character varying(10000)")
245 .HasMaxLength(10000);
247 b.Property<
bool?>(
"RequireDMApiValidation")
249 .HasColumnType(
"boolean");
251 b.Property<TimeSpan?>(
"Timeout")
253 .HasColumnType(
"interval");
257 b.HasIndex(
"InstanceId")
260 b.ToTable(
"DreamMakerSettings");
263 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
265 b.Property<
long?>(
"Id")
266 .ValueGeneratedOnAdd()
267 .HasColumnType(
"bigint")
268 .HasAnnotation(
"Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
270 b.Property<
long>(
"AutoUpdateInterval")
271 .HasColumnType(
"bigint");
273 b.Property<
int>(
"ChatBotLimit")
274 .HasColumnType(
"integer");
276 b.Property<
int>(
"ConfigurationType")
277 .HasColumnType(
"integer");
279 b.Property<
string>(
"Name")
281 .HasColumnType(
"character varying(100)")
284 b.Property<
bool?>(
"Online")
286 .HasColumnType(
"boolean");
288 b.Property<
string>(
"Path")
290 .HasColumnType(
"text");
292 b.Property<
string>(
"SwarmIdentifer")
293 .HasColumnType(
"text");
297 b.HasIndex(
"Path",
"SwarmIdentifer")
300 b.ToTable(
"Instances");
303 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
305 b.Property<
long>(
"Id")
306 .ValueGeneratedOnAdd()
307 .HasColumnType(
"bigint")
308 .HasAnnotation(
"Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
310 b.Property<decimal>(
"ByondRights")
311 .HasColumnType(
"numeric(20,0)");
313 b.Property<decimal>(
"ChatBotRights")
314 .HasColumnType(
"numeric(20,0)");
316 b.Property<decimal>(
"ConfigurationRights")
317 .HasColumnType(
"numeric(20,0)");
319 b.Property<decimal>(
"DreamDaemonRights")
320 .HasColumnType(
"numeric(20,0)");
322 b.Property<decimal>(
"DreamMakerRights")
323 .HasColumnType(
"numeric(20,0)");
325 b.Property<
long>(
"InstanceId")
326 .HasColumnType(
"bigint");
328 b.Property<decimal>(
"InstancePermissionSetRights")
329 .HasColumnType(
"numeric(20,0)");
331 b.Property<
long>(
"PermissionSetId")
332 .HasColumnType(
"bigint");
334 b.Property<decimal>(
"RepositoryRights")
335 .HasColumnType(
"numeric(20,0)");
339 b.HasIndex(
"InstanceId");
341 b.HasIndex(
"PermissionSetId",
"InstanceId")
344 b.ToTable(
"InstancePermissionSets");
347 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
349 b.Property<
long?>(
"Id")
350 .ValueGeneratedOnAdd()
351 .HasColumnType(
"bigint")
352 .HasAnnotation(
"Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
354 b.Property<decimal?>(
"CancelRight")
355 .HasColumnType(
"numeric(20,0)");
357 b.Property<decimal?>(
"CancelRightsType")
358 .HasColumnType(
"numeric(20,0)");
360 b.Property<
bool?>(
"Cancelled")
362 .HasColumnType(
"boolean");
364 b.Property<
long?>(
"CancelledById")
365 .HasColumnType(
"bigint");
367 b.Property<
string>(
"Description")
369 .HasColumnType(
"text");
371 b.Property<
long?>(
"ErrorCode")
372 .HasColumnType(
"bigint");
374 b.Property<
string>(
"ExceptionDetails")
375 .HasColumnType(
"text");
377 b.Property<
long>(
"InstanceId")
378 .HasColumnType(
"bigint");
380 b.Property<DateTimeOffset?>(
"StartedAt")
382 .HasColumnType(
"timestamp with time zone");
384 b.Property<
long>(
"StartedById")
385 .HasColumnType(
"bigint");
387 b.Property<DateTimeOffset?>(
"StoppedAt")
388 .HasColumnType(
"timestamp with time zone");
392 b.HasIndex(
"CancelledById");
394 b.HasIndex(
"InstanceId");
396 b.HasIndex(
"StartedById");
401 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
403 b.Property<
long>(
"Id")
404 .ValueGeneratedOnAdd()
405 .HasColumnType(
"bigint")
406 .HasAnnotation(
"Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
408 b.Property<
string>(
"ExternalUserId")
410 .HasColumnType(
"character varying(100)")
413 b.Property<
int>(
"Provider")
414 .HasColumnType(
"integer");
416 b.Property<
long?>(
"UserId")
417 .HasColumnType(
"bigint");
421 b.HasIndex(
"UserId");
423 b.HasIndex(
"Provider",
"ExternalUserId")
426 b.ToTable(
"OAuthConnections");
429 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
431 b.Property<
long?>(
"Id")
432 .ValueGeneratedOnAdd()
433 .HasColumnType(
"bigint")
434 .HasAnnotation(
"Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
436 b.Property<decimal>(
"AdministrationRights")
437 .HasColumnType(
"numeric(20,0)");
439 b.Property<
long?>(
"GroupId")
440 .HasColumnType(
"bigint");
442 b.Property<decimal>(
"InstanceManagerRights")
443 .HasColumnType(
"numeric(20,0)");
445 b.Property<
long?>(
"UserId")
446 .HasColumnType(
"bigint");
450 b.HasIndex(
"GroupId")
456 b.ToTable(
"PermissionSets");
459 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
461 b.Property<
long>(
"Id")
462 .ValueGeneratedOnAdd()
463 .HasColumnType(
"bigint")
464 .HasAnnotation(
"Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
466 b.Property<
string>(
"AccessIdentifier")
468 .HasColumnType(
"text");
470 b.Property<
long>(
"CompileJobId")
471 .HasColumnType(
"bigint");
473 b.Property<
int>(
"LaunchSecurityLevel")
474 .HasColumnType(
"integer");
476 b.Property<
int>(
"LaunchVisibility")
477 .HasColumnType(
"integer");
479 b.Property<
int>(
"Port")
480 .HasColumnType(
"integer");
482 b.Property<
int>(
"ProcessId")
483 .HasColumnType(
"integer");
485 b.Property<
int>(
"RebootState")
486 .HasColumnType(
"integer");
490 b.HasIndex(
"CompileJobId");
492 b.ToTable(
"ReattachInformations");
495 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
497 b.Property<
long>(
"Id")
498 .ValueGeneratedOnAdd()
499 .HasColumnType(
"bigint")
500 .HasAnnotation(
"Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
502 b.Property<
string>(
"AccessToken")
503 .HasColumnType(
"character varying(10000)")
504 .HasMaxLength(10000);
506 b.Property<
string>(
"AccessUser")
507 .HasColumnType(
"character varying(10000)")
508 .HasMaxLength(10000);
510 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
512 .HasColumnType(
"boolean");
514 b.Property<
bool?>(
"AutoUpdatesSynchronize")
516 .HasColumnType(
"boolean");
518 b.Property<
string>(
"CommitterEmail")
520 .HasColumnType(
"character varying(10000)")
521 .HasMaxLength(10000);
523 b.Property<
string>(
"CommitterName")
525 .HasColumnType(
"character varying(10000)")
526 .HasMaxLength(10000);
528 b.Property<
bool?>(
"CreateGitHubDeployments")
530 .HasColumnType(
"boolean");
532 b.Property<
long>(
"InstanceId")
533 .HasColumnType(
"bigint");
535 b.Property<
bool?>(
"PostTestMergeComment")
537 .HasColumnType(
"boolean");
539 b.Property<
bool?>(
"PushTestMergeCommits")
541 .HasColumnType(
"boolean");
543 b.Property<
bool?>(
"ShowTestMergeCommitters")
545 .HasColumnType(
"boolean");
547 b.Property<
bool?>(
"UpdateSubmodules")
549 .HasColumnType(
"boolean");
553 b.HasIndex(
"InstanceId")
556 b.ToTable(
"RepositorySettings");
559 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
561 b.Property<
long>(
"Id")
562 .ValueGeneratedOnAdd()
563 .HasColumnType(
"bigint")
564 .HasAnnotation(
"Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
566 b.Property<
long>(
"RevisionInformationId")
567 .HasColumnType(
"bigint");
569 b.Property<
long>(
"TestMergeId")
570 .HasColumnType(
"bigint");
574 b.HasIndex(
"RevisionInformationId");
576 b.HasIndex(
"TestMergeId");
578 b.ToTable(
"RevInfoTestMerges");
581 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
583 b.Property<
long>(
"Id")
584 .ValueGeneratedOnAdd()
585 .HasColumnType(
"bigint")
586 .HasAnnotation(
"Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
588 b.Property<
string>(
"CommitSha")
590 .HasColumnType(
"character varying(40)")
593 b.Property<
long>(
"InstanceId")
594 .HasColumnType(
"bigint");
596 b.Property<
string>(
"OriginCommitSha")
598 .HasColumnType(
"character varying(40)")
601 b.Property<DateTimeOffset>(
"Timestamp")
602 .HasColumnType(
"timestamp with time zone");
606 b.HasIndex(
"InstanceId",
"CommitSha")
609 b.ToTable(
"RevisionInformations");
612 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
614 b.Property<
long>(
"Id")
615 .ValueGeneratedOnAdd()
616 .HasColumnType(
"bigint")
617 .HasAnnotation(
"Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
619 b.Property<
string>(
"Author")
621 .HasColumnType(
"text");
623 b.Property<
string>(
"BodyAtMerge")
625 .HasColumnType(
"text");
627 b.Property<
string>(
"Comment")
628 .HasColumnType(
"character varying(10000)")
629 .HasMaxLength(10000);
631 b.Property<DateTimeOffset>(
"MergedAt")
632 .HasColumnType(
"timestamp with time zone");
634 b.Property<
long>(
"MergedById")
635 .HasColumnType(
"bigint");
637 b.Property<
int>(
"Number")
638 .HasColumnType(
"integer");
640 b.Property<
long?>(
"PrimaryRevisionInformationId")
642 .HasColumnType(
"bigint");
644 b.Property<
string>(
"TargetCommitSha")
646 .HasColumnType(
"character varying(40)")
649 b.Property<
string>(
"TitleAtMerge")
651 .HasColumnType(
"text");
653 b.Property<
string>(
"Url")
655 .HasColumnType(
"text");
659 b.HasIndex(
"MergedById");
661 b.HasIndex(
"PrimaryRevisionInformationId")
664 b.ToTable(
"TestMerges");
667 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
669 b.Property<
long?>(
"Id")
670 .ValueGeneratedOnAdd()
671 .HasColumnType(
"bigint")
672 .HasAnnotation(
"Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
674 b.Property<
string>(
"CanonicalName")
676 .HasColumnType(
"character varying(100)")
679 b.Property<DateTimeOffset?>(
"CreatedAt")
681 .HasColumnType(
"timestamp with time zone");
683 b.Property<
long?>(
"CreatedById")
684 .HasColumnType(
"bigint");
686 b.Property<
bool?>(
"Enabled")
688 .HasColumnType(
"boolean");
690 b.Property<
long?>(
"GroupId")
691 .HasColumnType(
"bigint");
693 b.Property<DateTimeOffset?>(
"LastPasswordUpdate")
694 .HasColumnType(
"timestamp with time zone");
696 b.Property<
string>(
"Name")
698 .HasColumnType(
"character varying(100)")
701 b.Property<
string>(
"PasswordHash")
702 .HasColumnType(
"text");
704 b.Property<
string>(
"SystemIdentifier")
705 .HasColumnType(
"character varying(100)")
710 b.HasIndex(
"CanonicalName")
713 b.HasIndex(
"CreatedById");
715 b.HasIndex(
"GroupId");
717 b.HasIndex(
"SystemIdentifier")
723 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
725 b.Property<
long?>(
"Id")
726 .ValueGeneratedOnAdd()
727 .HasColumnType(
"bigint")
728 .HasAnnotation(
"Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
730 b.Property<
string>(
"Name")
732 .HasColumnType(
"character varying(100)")
743 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
745 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
746 .WithMany(
"ChatSettings")
747 .HasForeignKey(
"InstanceId")
748 .OnDelete(DeleteBehavior.Cascade)
752 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
754 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
755 .WithMany(
"Channels")
756 .HasForeignKey(
"ChatSettingsId")
757 .OnDelete(DeleteBehavior.Cascade)
761 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
763 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
765 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
766 .OnDelete(DeleteBehavior.Cascade)
769 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
770 .WithMany(
"CompileJobs")
771 .HasForeignKey(
"RevisionInformationId")
772 .OnDelete(DeleteBehavior.Cascade)
776 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
778 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
779 .WithOne(
"DreamDaemonSettings")
780 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
781 .OnDelete(DeleteBehavior.Cascade)
785 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
787 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
788 .WithOne(
"DreamMakerSettings")
789 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
790 .OnDelete(DeleteBehavior.Cascade)
794 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
796 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
797 .WithMany(
"InstancePermissionSets")
798 .HasForeignKey(
"InstanceId")
799 .OnDelete(DeleteBehavior.Cascade)
802 b.HasOne(
"Tgstation.Server.Host.Models.PermissionSet",
"PermissionSet")
803 .WithMany(
"InstancePermissionSets")
804 .HasForeignKey(
"PermissionSetId")
805 .OnDelete(DeleteBehavior.Cascade)
809 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
811 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
813 .HasForeignKey(
"CancelledById");
815 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
817 .HasForeignKey(
"InstanceId")
818 .OnDelete(DeleteBehavior.Cascade)
821 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
823 .HasForeignKey(
"StartedById")
824 .OnDelete(DeleteBehavior.Cascade)
828 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
830 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
831 .WithMany(
"OAuthConnections")
832 .HasForeignKey(
"UserId")
833 .OnDelete(DeleteBehavior.Cascade);
836 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
838 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
839 .WithOne(
"PermissionSet")
840 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"GroupId")
841 .OnDelete(DeleteBehavior.Cascade);
843 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
844 .WithOne(
"PermissionSet")
845 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"UserId")
846 .OnDelete(DeleteBehavior.Cascade);
849 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
851 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
853 .HasForeignKey(
"CompileJobId")
854 .OnDelete(DeleteBehavior.Cascade)
858 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
860 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
861 .WithOne(
"RepositorySettings")
862 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
863 .OnDelete(DeleteBehavior.Cascade)
867 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
869 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
870 .WithMany(
"ActiveTestMerges")
871 .HasForeignKey(
"RevisionInformationId")
872 .OnDelete(DeleteBehavior.Cascade)
875 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
876 .WithMany(
"RevisonInformations")
877 .HasForeignKey(
"TestMergeId")
878 .OnDelete(DeleteBehavior.ClientNoAction)
882 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
884 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
885 .WithMany(
"RevisionInformations")
886 .HasForeignKey(
"InstanceId")
887 .OnDelete(DeleteBehavior.Cascade)
891 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
893 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
894 .WithMany(
"TestMerges")
895 .HasForeignKey(
"MergedById")
896 .OnDelete(DeleteBehavior.Restrict)
899 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
900 .WithOne(
"PrimaryTestMerge")
901 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
902 .OnDelete(DeleteBehavior.Cascade)
906 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
908 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
909 .WithMany(
"CreatedUsers")
910 .HasForeignKey(
"CreatedById");
912 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
914 .HasForeignKey(
"GroupId");
916#pragma warning restore 612, 618