17#pragma warning disable 612, 618
19 .HasAnnotation(
"ProductVersion",
"8.0.4")
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<
int?>(
"DMApiMajorVersion")
123 .HasColumnType(
"integer");
125 b.Property<
int?>(
"DMApiMinorVersion")
126 .HasColumnType(
"integer");
128 b.Property<
int?>(
"DMApiPatchVersion")
129 .HasColumnType(
"integer");
131 b.Property<Guid?>(
"DirectoryName")
133 .HasColumnType(
"uuid");
135 b.Property<
string>(
"DmeName")
137 .HasColumnType(
"text");
139 b.Property<
string>(
"EngineVersion")
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?>(
"DumpOnHealthCheckRestart")
200 .HasColumnType(
"boolean");
202 b.Property<
long>(
"HealthCheckSeconds")
203 .HasColumnType(
"bigint");
205 b.Property<
long>(
"InstanceId")
206 .HasColumnType(
"bigint");
208 b.Property<
bool?>(
"LogOutput")
210 .HasColumnType(
"boolean");
212 b.Property<
long>(
"MapThreads")
213 .HasColumnType(
"bigint");
215 b.Property<
bool?>(
"Minidumps")
217 .HasColumnType(
"boolean");
219 b.Property<
int>(
"Port")
220 .HasColumnType(
"integer");
222 b.Property<
int>(
"SecurityLevel")
223 .HasColumnType(
"integer");
225 b.Property<
bool?>(
"StartProfiler")
227 .HasColumnType(
"boolean");
229 b.Property<
long>(
"StartupTimeout")
230 .HasColumnType(
"bigint");
232 b.Property<
long>(
"TopicRequestTimeout")
233 .HasColumnType(
"bigint");
235 b.Property<
int>(
"Visibility")
236 .HasColumnType(
"integer");
240 b.HasIndex(
"InstanceId")
243 b.ToTable(
"DreamDaemonSettings");
246 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
248 b.Property<
long>(
"Id")
249 .ValueGeneratedOnAdd()
250 .HasColumnType(
"bigint");
252 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
254 b.Property<
int>(
"ApiValidationPort")
255 .HasColumnType(
"integer");
257 b.Property<
int>(
"ApiValidationSecurityLevel")
258 .HasColumnType(
"integer");
260 b.Property<
string>(
"CompilerAdditionalArguments")
262 .HasColumnType(
"character varying(10000)");
264 b.Property<
long>(
"InstanceId")
265 .HasColumnType(
"bigint");
267 b.Property<
string>(
"ProjectName")
269 .HasColumnType(
"character varying(10000)");
271 b.Property<
bool?>(
"RequireDMApiValidation")
273 .HasColumnType(
"boolean");
275 b.Property<TimeSpan?>(
"Timeout")
277 .HasColumnType(
"interval");
281 b.HasIndex(
"InstanceId")
284 b.ToTable(
"DreamMakerSettings");
287 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
289 b.Property<
long?>(
"Id")
290 .ValueGeneratedOnAdd()
291 .HasColumnType(
"bigint");
293 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
295 b.Property<
long>(
"AutoUpdateInterval")
296 .HasColumnType(
"bigint");
298 b.Property<
int>(
"ChatBotLimit")
299 .HasColumnType(
"integer");
301 b.Property<
int>(
"ConfigurationType")
302 .HasColumnType(
"integer");
304 b.Property<
string>(
"Name")
307 .HasColumnType(
"character varying(100)");
309 b.Property<
bool?>(
"Online")
311 .HasColumnType(
"boolean");
313 b.Property<
string>(
"Path")
315 .HasColumnType(
"text");
317 b.Property<
string>(
"SwarmIdentifer")
318 .HasColumnType(
"text");
322 b.HasIndex(
"Path",
"SwarmIdentifer")
325 b.ToTable(
"Instances");
328 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
330 b.Property<
long>(
"Id")
331 .ValueGeneratedOnAdd()
332 .HasColumnType(
"bigint");
334 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
336 b.Property<decimal>(
"ChatBotRights")
337 .HasColumnType(
"numeric(20,0)");
339 b.Property<decimal>(
"ConfigurationRights")
340 .HasColumnType(
"numeric(20,0)");
342 b.Property<decimal>(
"DreamDaemonRights")
343 .HasColumnType(
"numeric(20,0)");
345 b.Property<decimal>(
"DreamMakerRights")
346 .HasColumnType(
"numeric(20,0)");
348 b.Property<decimal>(
"EngineRights")
349 .HasColumnType(
"numeric(20,0)");
351 b.Property<
long>(
"InstanceId")
352 .HasColumnType(
"bigint");
354 b.Property<decimal>(
"InstancePermissionSetRights")
355 .HasColumnType(
"numeric(20,0)");
357 b.Property<
long>(
"PermissionSetId")
358 .HasColumnType(
"bigint");
360 b.Property<decimal>(
"RepositoryRights")
361 .HasColumnType(
"numeric(20,0)");
365 b.HasIndex(
"InstanceId");
367 b.HasIndex(
"PermissionSetId",
"InstanceId")
370 b.ToTable(
"InstancePermissionSets");
373 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
375 b.Property<
long?>(
"Id")
376 .ValueGeneratedOnAdd()
377 .HasColumnType(
"bigint");
379 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
381 b.Property<decimal?>(
"CancelRight")
382 .HasColumnType(
"numeric(20,0)");
384 b.Property<decimal?>(
"CancelRightsType")
385 .HasColumnType(
"numeric(20,0)");
387 b.Property<
bool?>(
"Cancelled")
389 .HasColumnType(
"boolean");
391 b.Property<
long?>(
"CancelledById")
392 .HasColumnType(
"bigint");
394 b.Property<
string>(
"Description")
396 .HasColumnType(
"text");
398 b.Property<
long?>(
"ErrorCode")
399 .HasColumnType(
"bigint");
401 b.Property<
string>(
"ExceptionDetails")
402 .HasColumnType(
"text");
404 b.Property<
long>(
"InstanceId")
405 .HasColumnType(
"bigint");
407 b.Property<
byte>(
"JobCode")
408 .HasColumnType(
"smallint");
410 b.Property<DateTimeOffset?>(
"StartedAt")
412 .HasColumnType(
"timestamp with time zone");
414 b.Property<
long>(
"StartedById")
415 .HasColumnType(
"bigint");
417 b.Property<DateTimeOffset?>(
"StoppedAt")
418 .HasColumnType(
"timestamp with time zone");
422 b.HasIndex(
"CancelledById");
424 b.HasIndex(
"InstanceId");
426 b.HasIndex(
"StartedById");
431 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
433 b.Property<
long>(
"Id")
434 .ValueGeneratedOnAdd()
435 .HasColumnType(
"bigint");
437 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
439 b.Property<
string>(
"ExternalUserId")
442 .HasColumnType(
"character varying(100)");
444 b.Property<
int>(
"Provider")
445 .HasColumnType(
"integer");
447 b.Property<
long?>(
"UserId")
448 .HasColumnType(
"bigint");
452 b.HasIndex(
"UserId");
454 b.HasIndex(
"Provider",
"ExternalUserId")
457 b.ToTable(
"OAuthConnections");
460 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
462 b.Property<
long?>(
"Id")
463 .ValueGeneratedOnAdd()
464 .HasColumnType(
"bigint");
466 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
468 b.Property<decimal>(
"AdministrationRights")
469 .HasColumnType(
"numeric(20,0)");
471 b.Property<
long?>(
"GroupId")
472 .HasColumnType(
"bigint");
474 b.Property<decimal>(
"InstanceManagerRights")
475 .HasColumnType(
"numeric(20,0)");
477 b.Property<
long?>(
"UserId")
478 .HasColumnType(
"bigint");
482 b.HasIndex(
"GroupId")
488 b.ToTable(
"PermissionSets");
491 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
493 b.Property<
long?>(
"Id")
494 .ValueGeneratedOnAdd()
495 .HasColumnType(
"bigint");
497 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
499 b.Property<
string>(
"AccessIdentifier")
501 .HasColumnType(
"text");
503 b.Property<
long>(
"CompileJobId")
504 .HasColumnType(
"bigint");
506 b.Property<
long?>(
"InitialCompileJobId")
507 .HasColumnType(
"bigint");
509 b.Property<
int>(
"LaunchSecurityLevel")
510 .HasColumnType(
"integer");
512 b.Property<
int>(
"LaunchVisibility")
513 .HasColumnType(
"integer");
515 b.Property<
int>(
"Port")
516 .HasColumnType(
"integer");
518 b.Property<
int>(
"ProcessId")
519 .HasColumnType(
"integer");
521 b.Property<
int>(
"RebootState")
522 .HasColumnType(
"integer");
524 b.Property<
int?>(
"TopicPort")
525 .HasColumnType(
"integer");
529 b.HasIndex(
"CompileJobId");
531 b.HasIndex(
"InitialCompileJobId");
533 b.ToTable(
"ReattachInformations");
536 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
538 b.Property<
long>(
"Id")
539 .ValueGeneratedOnAdd()
540 .HasColumnType(
"bigint");
542 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
544 b.Property<
string>(
"AccessToken")
546 .HasColumnType(
"character varying(10000)");
548 b.Property<
string>(
"AccessUser")
550 .HasColumnType(
"character varying(10000)");
552 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
554 .HasColumnType(
"boolean");
556 b.Property<
bool?>(
"AutoUpdatesSynchronize")
558 .HasColumnType(
"boolean");
560 b.Property<
string>(
"CommitterEmail")
563 .HasColumnType(
"character varying(10000)");
565 b.Property<
string>(
"CommitterName")
568 .HasColumnType(
"character varying(10000)");
570 b.Property<
bool?>(
"CreateGitHubDeployments")
572 .HasColumnType(
"boolean");
574 b.Property<
long>(
"InstanceId")
575 .HasColumnType(
"bigint");
577 b.Property<
bool?>(
"PostTestMergeComment")
579 .HasColumnType(
"boolean");
581 b.Property<
bool?>(
"PushTestMergeCommits")
583 .HasColumnType(
"boolean");
585 b.Property<
bool?>(
"ShowTestMergeCommitters")
587 .HasColumnType(
"boolean");
589 b.Property<
bool?>(
"UpdateSubmodules")
591 .HasColumnType(
"boolean");
595 b.HasIndex(
"InstanceId")
598 b.ToTable(
"RepositorySettings");
601 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
603 b.Property<
long>(
"Id")
604 .ValueGeneratedOnAdd()
605 .HasColumnType(
"bigint");
607 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
609 b.Property<
long>(
"RevisionInformationId")
610 .HasColumnType(
"bigint");
612 b.Property<
long>(
"TestMergeId")
613 .HasColumnType(
"bigint");
617 b.HasIndex(
"RevisionInformationId");
619 b.HasIndex(
"TestMergeId");
621 b.ToTable(
"RevInfoTestMerges");
624 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
626 b.Property<
long>(
"Id")
627 .ValueGeneratedOnAdd()
628 .HasColumnType(
"bigint");
630 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
632 b.Property<
string>(
"CommitSha")
635 .HasColumnType(
"character varying(40)");
637 b.Property<
long>(
"InstanceId")
638 .HasColumnType(
"bigint");
640 b.Property<
string>(
"OriginCommitSha")
643 .HasColumnType(
"character varying(40)");
645 b.Property<DateTimeOffset>(
"Timestamp")
646 .HasColumnType(
"timestamp with time zone");
650 b.HasIndex(
"InstanceId",
"CommitSha")
653 b.ToTable(
"RevisionInformations");
656 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
658 b.Property<
long>(
"Id")
659 .ValueGeneratedOnAdd()
660 .HasColumnType(
"bigint");
662 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
664 b.Property<
string>(
"Author")
666 .HasColumnType(
"text");
668 b.Property<
string>(
"BodyAtMerge")
670 .HasColumnType(
"text");
672 b.Property<
string>(
"Comment")
674 .HasColumnType(
"character varying(10000)");
676 b.Property<DateTimeOffset>(
"MergedAt")
677 .HasColumnType(
"timestamp with time zone");
679 b.Property<
long>(
"MergedById")
680 .HasColumnType(
"bigint");
682 b.Property<
int>(
"Number")
683 .HasColumnType(
"integer");
685 b.Property<
long?>(
"PrimaryRevisionInformationId")
687 .HasColumnType(
"bigint");
689 b.Property<
string>(
"TargetCommitSha")
692 .HasColumnType(
"character varying(40)");
694 b.Property<
string>(
"TitleAtMerge")
696 .HasColumnType(
"text");
698 b.Property<
string>(
"Url")
700 .HasColumnType(
"text");
704 b.HasIndex(
"MergedById");
706 b.HasIndex(
"PrimaryRevisionInformationId")
709 b.ToTable(
"TestMerges");
712 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
714 b.Property<
long?>(
"Id")
715 .ValueGeneratedOnAdd()
716 .HasColumnType(
"bigint");
718 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
720 b.Property<
string>(
"CanonicalName")
723 .HasColumnType(
"character varying(100)");
725 b.Property<DateTimeOffset?>(
"CreatedAt")
727 .HasColumnType(
"timestamp with time zone");
729 b.Property<
long?>(
"CreatedById")
730 .HasColumnType(
"bigint");
732 b.Property<
bool?>(
"Enabled")
734 .HasColumnType(
"boolean");
736 b.Property<
long?>(
"GroupId")
737 .HasColumnType(
"bigint");
739 b.Property<DateTimeOffset?>(
"LastPasswordUpdate")
740 .HasColumnType(
"timestamp with time zone");
742 b.Property<
string>(
"Name")
745 .HasColumnType(
"character varying(100)");
747 b.Property<
string>(
"PasswordHash")
748 .HasColumnType(
"text");
750 b.Property<
string>(
"SystemIdentifier")
752 .HasColumnType(
"character varying(100)");
756 b.HasIndex(
"CanonicalName")
759 b.HasIndex(
"CreatedById");
761 b.HasIndex(
"GroupId");
763 b.HasIndex(
"SystemIdentifier")
769 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
771 b.Property<
long?>(
"Id")
772 .ValueGeneratedOnAdd()
773 .HasColumnType(
"bigint");
775 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
777 b.Property<
string>(
"Name")
780 .HasColumnType(
"character varying(100)");
790 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
792 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
793 .WithMany(
"ChatSettings")
794 .HasForeignKey(
"InstanceId")
795 .OnDelete(DeleteBehavior.Cascade)
798 b.Navigation(
"Instance");
801 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
803 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
804 .WithMany(
"Channels")
805 .HasForeignKey(
"ChatSettingsId")
806 .OnDelete(DeleteBehavior.Cascade)
809 b.Navigation(
"ChatSettings");
812 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
814 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
816 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
817 .OnDelete(DeleteBehavior.Cascade)
820 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
821 .WithMany(
"CompileJobs")
822 .HasForeignKey(
"RevisionInformationId")
823 .OnDelete(DeleteBehavior.Cascade)
828 b.Navigation(
"RevisionInformation");
831 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
833 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
834 .WithOne(
"DreamDaemonSettings")
835 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
836 .OnDelete(DeleteBehavior.Cascade)
839 b.Navigation(
"Instance");
842 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
844 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
845 .WithOne(
"DreamMakerSettings")
846 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
847 .OnDelete(DeleteBehavior.Cascade)
850 b.Navigation(
"Instance");
853 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
855 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
856 .WithMany(
"InstancePermissionSets")
857 .HasForeignKey(
"InstanceId")
858 .OnDelete(DeleteBehavior.Cascade)
861 b.HasOne(
"Tgstation.Server.Host.Models.PermissionSet",
"PermissionSet")
862 .WithMany(
"InstancePermissionSets")
863 .HasForeignKey(
"PermissionSetId")
864 .OnDelete(DeleteBehavior.Cascade)
867 b.Navigation(
"Instance");
869 b.Navigation(
"PermissionSet");
872 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
874 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
876 .HasForeignKey(
"CancelledById");
878 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
880 .HasForeignKey(
"InstanceId")
881 .OnDelete(DeleteBehavior.Cascade)
884 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
886 .HasForeignKey(
"StartedById")
887 .OnDelete(DeleteBehavior.Cascade)
890 b.Navigation(
"CancelledBy");
892 b.Navigation(
"Instance");
894 b.Navigation(
"StartedBy");
897 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
899 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
900 .WithMany(
"OAuthConnections")
901 .HasForeignKey(
"UserId")
902 .OnDelete(DeleteBehavior.Cascade);
904 b.Navigation(
"User");
907 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
909 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
910 .WithOne(
"PermissionSet")
911 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"GroupId")
912 .OnDelete(DeleteBehavior.Cascade);
914 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
915 .WithOne(
"PermissionSet")
916 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"UserId")
917 .OnDelete(DeleteBehavior.Cascade);
919 b.Navigation(
"Group");
921 b.Navigation(
"User");
924 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
926 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
928 .HasForeignKey(
"CompileJobId")
929 .OnDelete(DeleteBehavior.Cascade)
932 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"InitialCompileJob")
934 .HasForeignKey(
"InitialCompileJobId");
936 b.Navigation(
"CompileJob");
938 b.Navigation(
"InitialCompileJob");
941 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
943 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
944 .WithOne(
"RepositorySettings")
945 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
946 .OnDelete(DeleteBehavior.Cascade)
949 b.Navigation(
"Instance");
952 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
954 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
955 .WithMany(
"ActiveTestMerges")
956 .HasForeignKey(
"RevisionInformationId")
957 .OnDelete(DeleteBehavior.Cascade)
960 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
961 .WithMany(
"RevisonInformations")
962 .HasForeignKey(
"TestMergeId")
963 .OnDelete(DeleteBehavior.ClientNoAction)
966 b.Navigation(
"RevisionInformation");
968 b.Navigation(
"TestMerge");
971 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
973 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
974 .WithMany(
"RevisionInformations")
975 .HasForeignKey(
"InstanceId")
976 .OnDelete(DeleteBehavior.Cascade)
979 b.Navigation(
"Instance");
982 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
984 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
985 .WithMany(
"TestMerges")
986 .HasForeignKey(
"MergedById")
987 .OnDelete(DeleteBehavior.Restrict)
990 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
991 .WithOne(
"PrimaryTestMerge")
992 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
993 .OnDelete(DeleteBehavior.Cascade)
996 b.Navigation(
"MergedBy");
998 b.Navigation(
"PrimaryRevisionInformation");
1001 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
1003 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
1004 .WithMany(
"CreatedUsers")
1005 .HasForeignKey(
"CreatedById");
1007 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
1009 .HasForeignKey(
"GroupId");
1011 b.Navigation(
"CreatedBy");
1013 b.Navigation(
"Group");
1016 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
1018 b.Navigation(
"Channels");
1021 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
1023 b.Navigation(
"ChatSettings");
1025 b.Navigation(
"DreamDaemonSettings");
1027 b.Navigation(
"DreamMakerSettings");
1029 b.Navigation(
"InstancePermissionSets");
1031 b.Navigation(
"Jobs");
1033 b.Navigation(
"RepositorySettings");
1035 b.Navigation(
"RevisionInformations");
1038 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
1040 b.Navigation(
"InstancePermissionSets");
1043 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
1045 b.Navigation(
"ActiveTestMerges");
1047 b.Navigation(
"CompileJobs");
1049 b.Navigation(
"PrimaryTestMerge");
1052 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
1054 b.Navigation(
"RevisonInformations");
1057 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
1059 b.Navigation(
"CreatedUsers");
1061 b.Navigation(
"OAuthConnections");
1063 b.Navigation(
"PermissionSet");
1065 b.Navigation(
"TestMerges");
1068 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
1070 b.Navigation(
"PermissionSet")
1073 b.Navigation(
"Users");
1075#pragma warning restore 612, 618