17#pragma warning disable 612, 618
19 .HasAnnotation(
"ProductVersion",
"7.0.7")
20 .HasAnnotation(
"Relational:MaxIdentifierLength", 63);
22 NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
24 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
26 b.Property<
long?>(
"Id")
27 .ValueGeneratedOnAdd()
28 .HasColumnType(
"bigint");
30 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
32 b.Property<
int>(
"ChannelLimit")
33 .HasColumnType(
"integer");
35 b.Property<
string>(
"ConnectionString")
38 .HasColumnType(
"character varying(10000)");
40 b.Property<
bool?>(
"Enabled")
41 .HasColumnType(
"boolean");
43 b.Property<
long>(
"InstanceId")
44 .HasColumnType(
"bigint");
46 b.Property<
string>(
"Name")
49 .HasColumnType(
"character varying(100)");
51 b.Property<
int>(
"Provider")
52 .HasColumnType(
"integer");
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 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
73 b.Property<
long>(
"ChatSettingsId")
74 .HasColumnType(
"bigint");
76 b.Property<decimal?>(
"DiscordChannelId")
77 .HasColumnType(
"numeric(20,0)");
79 b.Property<
string>(
"IrcChannel")
81 .HasColumnType(
"character varying(100)");
83 b.Property<
bool?>(
"IsAdminChannel")
85 .HasColumnType(
"boolean");
87 b.Property<
bool?>(
"IsSystemChannel")
89 .HasColumnType(
"boolean");
91 b.Property<
bool?>(
"IsUpdatesChannel")
93 .HasColumnType(
"boolean");
95 b.Property<
bool?>(
"IsWatchdogChannel")
97 .HasColumnType(
"boolean");
99 b.Property<
string>(
"Tag")
101 .HasColumnType(
"character varying(10000)");
105 b.HasIndex(
"ChatSettingsId",
"DiscordChannelId")
108 b.HasIndex(
"ChatSettingsId",
"IrcChannel")
111 b.ToTable(
"ChatChannels");
114 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
116 b.Property<
long?>(
"Id")
117 .ValueGeneratedOnAdd()
118 .HasColumnType(
"bigint");
120 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
122 b.Property<
string>(
"ByondVersion")
124 .HasColumnType(
"text");
126 b.Property<
int?>(
"DMApiMajorVersion")
127 .HasColumnType(
"integer");
129 b.Property<
int?>(
"DMApiMinorVersion")
130 .HasColumnType(
"integer");
132 b.Property<
int?>(
"DMApiPatchVersion")
133 .HasColumnType(
"integer");
135 b.Property<Guid?>(
"DirectoryName")
137 .HasColumnType(
"uuid");
139 b.Property<
string>(
"DmeName")
141 .HasColumnType(
"text");
143 b.Property<
int?>(
"GitHubDeploymentId")
144 .HasColumnType(
"integer");
146 b.Property<
long?>(
"GitHubRepoId")
147 .HasColumnType(
"bigint");
149 b.Property<
long>(
"JobId")
150 .HasColumnType(
"bigint");
152 b.Property<
int?>(
"MinimumSecurityLevel")
153 .HasColumnType(
"integer");
155 b.Property<
string>(
"Output")
157 .HasColumnType(
"text");
159 b.Property<
string>(
"RepositoryOrigin")
160 .HasColumnType(
"text");
162 b.Property<
long>(
"RevisionInformationId")
163 .HasColumnType(
"bigint");
167 b.HasIndex(
"DirectoryName");
172 b.HasIndex(
"RevisionInformationId");
174 b.ToTable(
"CompileJobs");
177 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
179 b.Property<
long>(
"Id")
180 .ValueGeneratedOnAdd()
181 .HasColumnType(
"bigint");
183 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
185 b.Property<
string>(
"AdditionalParameters")
188 .HasColumnType(
"character varying(10000)");
190 b.Property<
bool?>(
"AllowWebClient")
192 .HasColumnType(
"boolean");
194 b.Property<
bool?>(
"AutoStart")
196 .HasColumnType(
"boolean");
198 b.Property<
bool?>(
"DumpOnHeartbeatRestart")
200 .HasColumnType(
"boolean")
201 .HasColumnName(
"DumpOnHealthCheckRestart");
203 b.Property<
long>(
"HeartbeatSeconds")
204 .HasColumnType(
"bigint")
205 .HasColumnName(
"HealthCheckSeconds");
207 b.Property<
long>(
"InstanceId")
208 .HasColumnType(
"bigint");
210 b.Property<
bool?>(
"LogOutput")
212 .HasColumnType(
"boolean");
214 b.Property<
int>(
"Port")
215 .HasColumnType(
"integer");
217 b.Property<
int>(
"SecurityLevel")
218 .HasColumnType(
"integer");
220 b.Property<
bool?>(
"StartProfiler")
222 .HasColumnType(
"boolean");
224 b.Property<
long>(
"StartupTimeout")
225 .HasColumnType(
"bigint");
227 b.Property<
long>(
"TopicRequestTimeout")
228 .HasColumnType(
"bigint");
230 b.Property<
int>(
"Visibility")
231 .HasColumnType(
"integer");
235 b.HasIndex(
"InstanceId")
238 b.ToTable(
"DreamDaemonSettings");
241 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
243 b.Property<
long>(
"Id")
244 .ValueGeneratedOnAdd()
245 .HasColumnType(
"bigint");
247 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
249 b.Property<
int>(
"ApiValidationPort")
250 .HasColumnType(
"integer");
252 b.Property<
int>(
"ApiValidationSecurityLevel")
253 .HasColumnType(
"integer");
255 b.Property<
long>(
"InstanceId")
256 .HasColumnType(
"bigint");
258 b.Property<
string>(
"ProjectName")
260 .HasColumnType(
"character varying(10000)");
262 b.Property<
bool?>(
"RequireDMApiValidation")
264 .HasColumnType(
"boolean");
266 b.Property<TimeSpan?>(
"Timeout")
268 .HasColumnType(
"interval");
272 b.HasIndex(
"InstanceId")
275 b.ToTable(
"DreamMakerSettings");
278 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
280 b.Property<
long?>(
"Id")
281 .ValueGeneratedOnAdd()
282 .HasColumnType(
"bigint");
284 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
286 b.Property<
long>(
"AutoUpdateInterval")
287 .HasColumnType(
"bigint");
289 b.Property<
int>(
"ChatBotLimit")
290 .HasColumnType(
"integer");
292 b.Property<
int>(
"ConfigurationType")
293 .HasColumnType(
"integer");
295 b.Property<
string>(
"Name")
298 .HasColumnType(
"character varying(100)");
300 b.Property<
bool?>(
"Online")
302 .HasColumnType(
"boolean");
304 b.Property<
string>(
"Path")
306 .HasColumnType(
"text");
308 b.Property<
string>(
"SwarmIdentifer")
309 .HasColumnType(
"text");
313 b.HasIndex(
"Path",
"SwarmIdentifer")
316 b.ToTable(
"Instances");
319 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
321 b.Property<
long>(
"Id")
322 .ValueGeneratedOnAdd()
323 .HasColumnType(
"bigint");
325 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
327 b.Property<decimal>(
"ByondRights")
328 .HasColumnType(
"numeric(20,0)");
330 b.Property<decimal>(
"ChatBotRights")
331 .HasColumnType(
"numeric(20,0)");
333 b.Property<decimal>(
"ConfigurationRights")
334 .HasColumnType(
"numeric(20,0)");
336 b.Property<decimal>(
"DreamDaemonRights")
337 .HasColumnType(
"numeric(20,0)");
339 b.Property<decimal>(
"DreamMakerRights")
340 .HasColumnType(
"numeric(20,0)");
342 b.Property<
long>(
"InstanceId")
343 .HasColumnType(
"bigint");
345 b.Property<decimal>(
"InstancePermissionSetRights")
346 .HasColumnType(
"numeric(20,0)");
348 b.Property<
long>(
"PermissionSetId")
349 .HasColumnType(
"bigint");
351 b.Property<decimal>(
"RepositoryRights")
352 .HasColumnType(
"numeric(20,0)");
356 b.HasIndex(
"InstanceId");
358 b.HasIndex(
"PermissionSetId",
"InstanceId")
361 b.ToTable(
"InstancePermissionSets");
364 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
366 b.Property<
long?>(
"Id")
367 .ValueGeneratedOnAdd()
368 .HasColumnType(
"bigint");
370 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
372 b.Property<decimal?>(
"CancelRight")
373 .HasColumnType(
"numeric(20,0)");
375 b.Property<decimal?>(
"CancelRightsType")
376 .HasColumnType(
"numeric(20,0)");
378 b.Property<
bool?>(
"Cancelled")
380 .HasColumnType(
"boolean");
382 b.Property<
long?>(
"CancelledById")
383 .HasColumnType(
"bigint");
385 b.Property<
string>(
"Description")
387 .HasColumnType(
"text");
389 b.Property<
long?>(
"ErrorCode")
390 .HasColumnType(
"bigint");
392 b.Property<
string>(
"ExceptionDetails")
393 .HasColumnType(
"text");
395 b.Property<
long>(
"InstanceId")
396 .HasColumnType(
"bigint");
398 b.Property<DateTimeOffset?>(
"StartedAt")
400 .HasColumnType(
"timestamp with time zone");
402 b.Property<
long>(
"StartedById")
403 .HasColumnType(
"bigint");
405 b.Property<DateTimeOffset?>(
"StoppedAt")
406 .HasColumnType(
"timestamp with time zone");
410 b.HasIndex(
"CancelledById");
412 b.HasIndex(
"InstanceId");
414 b.HasIndex(
"StartedById");
419 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
421 b.Property<
long>(
"Id")
422 .ValueGeneratedOnAdd()
423 .HasColumnType(
"bigint");
425 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
427 b.Property<
string>(
"ExternalUserId")
430 .HasColumnType(
"character varying(100)");
432 b.Property<
int>(
"Provider")
433 .HasColumnType(
"integer");
435 b.Property<
long?>(
"UserId")
436 .HasColumnType(
"bigint");
440 b.HasIndex(
"UserId");
442 b.HasIndex(
"Provider",
"ExternalUserId")
445 b.ToTable(
"OAuthConnections");
448 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
450 b.Property<
long?>(
"Id")
451 .ValueGeneratedOnAdd()
452 .HasColumnType(
"bigint");
454 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
456 b.Property<decimal>(
"AdministrationRights")
457 .HasColumnType(
"numeric(20,0)");
459 b.Property<
long?>(
"GroupId")
460 .HasColumnType(
"bigint");
462 b.Property<decimal>(
"InstanceManagerRights")
463 .HasColumnType(
"numeric(20,0)");
465 b.Property<
long?>(
"UserId")
466 .HasColumnType(
"bigint");
470 b.HasIndex(
"GroupId")
476 b.ToTable(
"PermissionSets");
479 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
481 b.Property<
long>(
"Id")
482 .ValueGeneratedOnAdd()
483 .HasColumnType(
"bigint");
485 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
487 b.Property<
string>(
"AccessIdentifier")
489 .HasColumnType(
"text");
491 b.Property<
long>(
"CompileJobId")
492 .HasColumnType(
"bigint");
494 b.Property<
long?>(
"InitialCompileJobId")
495 .HasColumnType(
"bigint");
497 b.Property<
int>(
"LaunchSecurityLevel")
498 .HasColumnType(
"integer");
500 b.Property<
int>(
"LaunchVisibility")
501 .HasColumnType(
"integer");
503 b.Property<
int>(
"Port")
504 .HasColumnType(
"integer");
506 b.Property<
int>(
"ProcessId")
507 .HasColumnType(
"integer");
509 b.Property<
int>(
"RebootState")
510 .HasColumnType(
"integer");
514 b.HasIndex(
"CompileJobId");
516 b.HasIndex(
"InitialCompileJobId");
518 b.ToTable(
"ReattachInformations");
521 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
523 b.Property<
long>(
"Id")
524 .ValueGeneratedOnAdd()
525 .HasColumnType(
"bigint");
527 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
529 b.Property<
string>(
"AccessToken")
531 .HasColumnType(
"character varying(10000)");
533 b.Property<
string>(
"AccessUser")
535 .HasColumnType(
"character varying(10000)");
537 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
539 .HasColumnType(
"boolean");
541 b.Property<
bool?>(
"AutoUpdatesSynchronize")
543 .HasColumnType(
"boolean");
545 b.Property<
string>(
"CommitterEmail")
548 .HasColumnType(
"character varying(10000)");
550 b.Property<
string>(
"CommitterName")
553 .HasColumnType(
"character varying(10000)");
555 b.Property<
bool?>(
"CreateGitHubDeployments")
557 .HasColumnType(
"boolean");
559 b.Property<
long>(
"InstanceId")
560 .HasColumnType(
"bigint");
562 b.Property<
bool?>(
"PostTestMergeComment")
564 .HasColumnType(
"boolean");
566 b.Property<
bool?>(
"PushTestMergeCommits")
568 .HasColumnType(
"boolean");
570 b.Property<
bool?>(
"ShowTestMergeCommitters")
572 .HasColumnType(
"boolean");
574 b.Property<
bool?>(
"UpdateSubmodules")
576 .HasColumnType(
"boolean");
580 b.HasIndex(
"InstanceId")
583 b.ToTable(
"RepositorySettings");
586 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
588 b.Property<
long>(
"Id")
589 .ValueGeneratedOnAdd()
590 .HasColumnType(
"bigint");
592 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
594 b.Property<
long>(
"RevisionInformationId")
595 .HasColumnType(
"bigint");
597 b.Property<
long>(
"TestMergeId")
598 .HasColumnType(
"bigint");
602 b.HasIndex(
"RevisionInformationId");
604 b.HasIndex(
"TestMergeId");
606 b.ToTable(
"RevInfoTestMerges");
609 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
611 b.Property<
long>(
"Id")
612 .ValueGeneratedOnAdd()
613 .HasColumnType(
"bigint");
615 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
617 b.Property<
string>(
"CommitSha")
620 .HasColumnType(
"character varying(40)");
622 b.Property<
long>(
"InstanceId")
623 .HasColumnType(
"bigint");
625 b.Property<
string>(
"OriginCommitSha")
628 .HasColumnType(
"character varying(40)");
630 b.Property<DateTimeOffset>(
"Timestamp")
631 .HasColumnType(
"timestamp with time zone");
635 b.HasIndex(
"InstanceId",
"CommitSha")
638 b.ToTable(
"RevisionInformations");
641 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
643 b.Property<
long>(
"Id")
644 .ValueGeneratedOnAdd()
645 .HasColumnType(
"bigint");
647 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
649 b.Property<
string>(
"Author")
651 .HasColumnType(
"text");
653 b.Property<
string>(
"BodyAtMerge")
655 .HasColumnType(
"text");
657 b.Property<
string>(
"Comment")
659 .HasColumnType(
"character varying(10000)");
661 b.Property<DateTimeOffset>(
"MergedAt")
662 .HasColumnType(
"timestamp with time zone");
664 b.Property<
long>(
"MergedById")
665 .HasColumnType(
"bigint");
667 b.Property<
int>(
"Number")
668 .HasColumnType(
"integer");
670 b.Property<
long?>(
"PrimaryRevisionInformationId")
672 .HasColumnType(
"bigint");
674 b.Property<
string>(
"TargetCommitSha")
677 .HasColumnType(
"character varying(40)");
679 b.Property<
string>(
"TitleAtMerge")
681 .HasColumnType(
"text");
683 b.Property<
string>(
"Url")
685 .HasColumnType(
"text");
689 b.HasIndex(
"MergedById");
691 b.HasIndex(
"PrimaryRevisionInformationId")
694 b.ToTable(
"TestMerges");
697 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
699 b.Property<
long?>(
"Id")
700 .ValueGeneratedOnAdd()
701 .HasColumnType(
"bigint");
703 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
705 b.Property<
string>(
"CanonicalName")
708 .HasColumnType(
"character varying(100)");
710 b.Property<DateTimeOffset?>(
"CreatedAt")
712 .HasColumnType(
"timestamp with time zone");
714 b.Property<
long?>(
"CreatedById")
715 .HasColumnType(
"bigint");
717 b.Property<
bool?>(
"Enabled")
719 .HasColumnType(
"boolean");
721 b.Property<
long?>(
"GroupId")
722 .HasColumnType(
"bigint");
724 b.Property<DateTimeOffset?>(
"LastPasswordUpdate")
725 .HasColumnType(
"timestamp with time zone");
727 b.Property<
string>(
"Name")
730 .HasColumnType(
"character varying(100)");
732 b.Property<
string>(
"PasswordHash")
733 .HasColumnType(
"text");
735 b.Property<
string>(
"SystemIdentifier")
737 .HasColumnType(
"character varying(100)");
741 b.HasIndex(
"CanonicalName")
744 b.HasIndex(
"CreatedById");
746 b.HasIndex(
"GroupId");
748 b.HasIndex(
"SystemIdentifier")
754 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
756 b.Property<
long?>(
"Id")
757 .ValueGeneratedOnAdd()
758 .HasColumnType(
"bigint");
760 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
762 b.Property<
string>(
"Name")
765 .HasColumnType(
"character varying(100)");
775 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
777 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
778 .WithMany(
"ChatSettings")
779 .HasForeignKey(
"InstanceId")
780 .OnDelete(DeleteBehavior.Cascade)
783 b.Navigation(
"Instance");
786 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
788 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
789 .WithMany(
"Channels")
790 .HasForeignKey(
"ChatSettingsId")
791 .OnDelete(DeleteBehavior.Cascade)
794 b.Navigation(
"ChatSettings");
797 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
799 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
801 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
802 .OnDelete(DeleteBehavior.Cascade)
805 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
806 .WithMany(
"CompileJobs")
807 .HasForeignKey(
"RevisionInformationId")
808 .OnDelete(DeleteBehavior.Cascade)
813 b.Navigation(
"RevisionInformation");
816 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
818 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
819 .WithOne(
"DreamDaemonSettings")
820 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
821 .OnDelete(DeleteBehavior.Cascade)
824 b.Navigation(
"Instance");
827 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
829 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
830 .WithOne(
"DreamMakerSettings")
831 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
832 .OnDelete(DeleteBehavior.Cascade)
835 b.Navigation(
"Instance");
838 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
840 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
841 .WithMany(
"InstancePermissionSets")
842 .HasForeignKey(
"InstanceId")
843 .OnDelete(DeleteBehavior.Cascade)
846 b.HasOne(
"Tgstation.Server.Host.Models.PermissionSet",
"PermissionSet")
847 .WithMany(
"InstancePermissionSets")
848 .HasForeignKey(
"PermissionSetId")
849 .OnDelete(DeleteBehavior.Cascade)
852 b.Navigation(
"Instance");
854 b.Navigation(
"PermissionSet");
857 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
859 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
861 .HasForeignKey(
"CancelledById");
863 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
865 .HasForeignKey(
"InstanceId")
866 .OnDelete(DeleteBehavior.Cascade)
869 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
871 .HasForeignKey(
"StartedById")
872 .OnDelete(DeleteBehavior.Cascade)
875 b.Navigation(
"CancelledBy");
877 b.Navigation(
"Instance");
879 b.Navigation(
"StartedBy");
882 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
884 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
885 .WithMany(
"OAuthConnections")
886 .HasForeignKey(
"UserId")
887 .OnDelete(DeleteBehavior.Cascade);
889 b.Navigation(
"User");
892 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
894 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
895 .WithOne(
"PermissionSet")
896 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"GroupId")
897 .OnDelete(DeleteBehavior.Cascade);
899 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
900 .WithOne(
"PermissionSet")
901 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"UserId")
902 .OnDelete(DeleteBehavior.Cascade);
904 b.Navigation(
"Group");
906 b.Navigation(
"User");
909 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
911 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
913 .HasForeignKey(
"CompileJobId")
914 .OnDelete(DeleteBehavior.Cascade)
917 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"InitialCompileJob")
919 .HasForeignKey(
"InitialCompileJobId");
921 b.Navigation(
"CompileJob");
923 b.Navigation(
"InitialCompileJob");
926 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
928 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
929 .WithOne(
"RepositorySettings")
930 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
931 .OnDelete(DeleteBehavior.Cascade)
934 b.Navigation(
"Instance");
937 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
939 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
940 .WithMany(
"ActiveTestMerges")
941 .HasForeignKey(
"RevisionInformationId")
942 .OnDelete(DeleteBehavior.Cascade)
945 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
946 .WithMany(
"RevisonInformations")
947 .HasForeignKey(
"TestMergeId")
948 .OnDelete(DeleteBehavior.ClientNoAction)
951 b.Navigation(
"RevisionInformation");
953 b.Navigation(
"TestMerge");
956 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
958 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
959 .WithMany(
"RevisionInformations")
960 .HasForeignKey(
"InstanceId")
961 .OnDelete(DeleteBehavior.Cascade)
964 b.Navigation(
"Instance");
967 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
969 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
970 .WithMany(
"TestMerges")
971 .HasForeignKey(
"MergedById")
972 .OnDelete(DeleteBehavior.Restrict)
975 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
976 .WithOne(
"PrimaryTestMerge")
977 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
978 .OnDelete(DeleteBehavior.Cascade)
981 b.Navigation(
"MergedBy");
983 b.Navigation(
"PrimaryRevisionInformation");
986 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
988 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
989 .WithMany(
"CreatedUsers")
990 .HasForeignKey(
"CreatedById");
992 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
994 .HasForeignKey(
"GroupId");
996 b.Navigation(
"CreatedBy");
998 b.Navigation(
"Group");
1001 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
1003 b.Navigation(
"Channels");
1006 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
1008 b.Navigation(
"ChatSettings");
1010 b.Navigation(
"DreamDaemonSettings");
1012 b.Navigation(
"DreamMakerSettings");
1014 b.Navigation(
"InstancePermissionSets");
1016 b.Navigation(
"Jobs");
1018 b.Navigation(
"RepositorySettings");
1020 b.Navigation(
"RevisionInformations");
1023 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
1025 b.Navigation(
"InstancePermissionSets");
1028 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
1030 b.Navigation(
"ActiveTestMerges");
1032 b.Navigation(
"CompileJobs");
1034 b.Navigation(
"PrimaryTestMerge");
1037 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
1039 b.Navigation(
"RevisonInformations");
1042 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
1044 b.Navigation(
"CreatedUsers");
1046 b.Navigation(
"OAuthConnections");
1048 b.Navigation(
"PermissionSet");
1050 b.Navigation(
"TestMerges");
1053 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
1055 b.Navigation(
"PermissionSet")
1058 b.Navigation(
"Users");
1060#pragma warning restore 612, 618