12 protected override void BuildModel(ModelBuilder modelBuilder)
14#pragma warning disable 612, 618
16 .HasAnnotation(
"ProductVersion",
"8.0.10")
17 .HasAnnotation(
"Relational:MaxIdentifierLength", 63);
19 NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
21 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
23 b.Property<
long?>(
"Id")
24 .ValueGeneratedOnAdd()
25 .HasColumnType(
"bigint");
27 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
29 b.Property<
int>(
"ChannelLimit")
30 .HasColumnType(
"integer");
32 b.Property<
string>(
"ConnectionString")
35 .HasColumnType(
"character varying(10000)");
37 b.Property<
bool?>(
"Enabled")
38 .HasColumnType(
"boolean");
40 b.Property<
long>(
"InstanceId")
41 .HasColumnType(
"bigint");
43 b.Property<
string>(
"Name")
46 .HasColumnType(
"character varying(100)");
48 b.Property<
int>(
"Provider")
49 .HasColumnType(
"integer");
51 b.Property<
long>(
"ReconnectionInterval")
52 .HasColumnType(
"bigint");
56 b.HasIndex(
"InstanceId",
"Name")
59 b.ToTable(
"ChatBots");
62 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
64 b.Property<
long>(
"Id")
65 .ValueGeneratedOnAdd()
66 .HasColumnType(
"bigint");
68 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
70 b.Property<
long>(
"ChatSettingsId")
71 .HasColumnType(
"bigint");
73 b.Property<decimal?>(
"DiscordChannelId")
74 .HasColumnType(
"numeric(20,0)");
76 b.Property<
string>(
"IrcChannel")
78 .HasColumnType(
"character varying(100)");
80 b.Property<
bool?>(
"IsAdminChannel")
82 .HasColumnType(
"boolean");
84 b.Property<
bool?>(
"IsSystemChannel")
86 .HasColumnType(
"boolean");
88 b.Property<
bool?>(
"IsUpdatesChannel")
90 .HasColumnType(
"boolean");
92 b.Property<
bool?>(
"IsWatchdogChannel")
94 .HasColumnType(
"boolean");
96 b.Property<
string>(
"Tag")
98 .HasColumnType(
"character varying(10000)");
102 b.HasIndex(
"ChatSettingsId",
"DiscordChannelId")
105 b.HasIndex(
"ChatSettingsId",
"IrcChannel")
108 b.ToTable(
"ChatChannels");
111 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
113 b.Property<
long?>(
"Id")
114 .ValueGeneratedOnAdd()
115 .HasColumnType(
"bigint");
117 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
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<
string>(
"EngineVersion")
138 .HasColumnType(
"text");
140 b.Property<
long?>(
"GitHubDeploymentId")
141 .HasColumnType(
"bigint");
143 b.Property<
long?>(
"GitHubRepoId")
144 .HasColumnType(
"bigint");
146 b.Property<
long>(
"JobId")
147 .HasColumnType(
"bigint");
149 b.Property<
int?>(
"MinimumSecurityLevel")
150 .HasColumnType(
"integer");
152 b.Property<
string>(
"Output")
154 .HasColumnType(
"text");
156 b.Property<
string>(
"RepositoryOrigin")
157 .HasColumnType(
"text");
159 b.Property<
long>(
"RevisionInformationId")
160 .HasColumnType(
"bigint");
164 b.HasIndex(
"DirectoryName");
169 b.HasIndex(
"RevisionInformationId");
171 b.ToTable(
"CompileJobs");
174 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
176 b.Property<
long>(
"Id")
177 .ValueGeneratedOnAdd()
178 .HasColumnType(
"bigint");
180 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
182 b.Property<
string>(
"AdditionalParameters")
185 .HasColumnType(
"character varying(10000)");
187 b.Property<
bool?>(
"AllowWebClient")
189 .HasColumnType(
"boolean");
191 b.Property<
bool?>(
"AutoStart")
193 .HasColumnType(
"boolean");
195 b.Property<
bool?>(
"DumpOnHealthCheckRestart")
197 .HasColumnType(
"boolean");
199 b.Property<
long>(
"HealthCheckSeconds")
200 .HasColumnType(
"bigint");
202 b.Property<
long>(
"InstanceId")
203 .HasColumnType(
"bigint");
205 b.Property<
bool?>(
"LogOutput")
207 .HasColumnType(
"boolean");
209 b.Property<
long>(
"MapThreads")
210 .HasColumnType(
"bigint");
212 b.Property<
bool?>(
"Minidumps")
214 .HasColumnType(
"boolean");
216 b.Property<
int>(
"OpenDreamTopicPort")
217 .HasColumnType(
"integer");
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<
int>(
"DMApiValidationMode")
265 .HasColumnType(
"integer");
267 b.Property<
long>(
"InstanceId")
268 .HasColumnType(
"bigint");
270 b.Property<
string>(
"ProjectName")
272 .HasColumnType(
"character varying(10000)");
274 b.Property<TimeSpan?>(
"Timeout")
276 .HasColumnType(
"interval");
280 b.HasIndex(
"InstanceId")
283 b.ToTable(
"DreamMakerSettings");
286 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
288 b.Property<
long?>(
"Id")
289 .ValueGeneratedOnAdd()
290 .HasColumnType(
"bigint");
292 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
294 b.Property<
string>(
"AutoStartCron")
297 .HasColumnType(
"character varying(1000)");
299 b.Property<
string>(
"AutoStopCron")
302 .HasColumnType(
"character varying(1000)");
304 b.Property<
string>(
"AutoUpdateCron")
307 .HasColumnType(
"character varying(1000)");
309 b.Property<
long>(
"AutoUpdateInterval")
310 .HasColumnType(
"bigint");
312 b.Property<
int>(
"ChatBotLimit")
313 .HasColumnType(
"integer");
315 b.Property<
int>(
"ConfigurationType")
316 .HasColumnType(
"integer");
318 b.Property<
string>(
"Name")
321 .HasColumnType(
"character varying(100)");
323 b.Property<
bool?>(
"Online")
325 .HasColumnType(
"boolean");
327 b.Property<
string>(
"Path")
329 .HasColumnType(
"text");
331 b.Property<
string>(
"SwarmIdentifer")
332 .HasColumnType(
"text");
336 b.HasIndex(
"Path",
"SwarmIdentifer")
339 b.ToTable(
"Instances");
342 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
344 b.Property<
long>(
"Id")
345 .ValueGeneratedOnAdd()
346 .HasColumnType(
"bigint");
348 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
350 b.Property<decimal>(
"ChatBotRights")
351 .HasColumnType(
"numeric(20,0)");
353 b.Property<decimal>(
"ConfigurationRights")
354 .HasColumnType(
"numeric(20,0)");
356 b.Property<decimal>(
"DreamDaemonRights")
357 .HasColumnType(
"numeric(20,0)");
359 b.Property<decimal>(
"DreamMakerRights")
360 .HasColumnType(
"numeric(20,0)");
362 b.Property<decimal>(
"EngineRights")
363 .HasColumnType(
"numeric(20,0)");
365 b.Property<
long>(
"InstanceId")
366 .HasColumnType(
"bigint");
368 b.Property<decimal>(
"InstancePermissionSetRights")
369 .HasColumnType(
"numeric(20,0)");
371 b.Property<
long>(
"PermissionSetId")
372 .HasColumnType(
"bigint");
374 b.Property<decimal>(
"RepositoryRights")
375 .HasColumnType(
"numeric(20,0)");
379 b.HasIndex(
"InstanceId");
381 b.HasIndex(
"PermissionSetId",
"InstanceId")
384 b.ToTable(
"InstancePermissionSets");
387 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
389 b.Property<
long?>(
"Id")
390 .ValueGeneratedOnAdd()
391 .HasColumnType(
"bigint");
393 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
395 b.Property<decimal?>(
"CancelRight")
396 .HasColumnType(
"numeric(20,0)");
398 b.Property<decimal?>(
"CancelRightsType")
399 .HasColumnType(
"numeric(20,0)");
401 b.Property<
bool?>(
"Cancelled")
403 .HasColumnType(
"boolean");
405 b.Property<
long?>(
"CancelledById")
406 .HasColumnType(
"bigint");
408 b.Property<
string>(
"Description")
410 .HasColumnType(
"text");
412 b.Property<
long?>(
"ErrorCode")
413 .HasColumnType(
"bigint");
415 b.Property<
string>(
"ExceptionDetails")
416 .HasColumnType(
"text");
418 b.Property<
long>(
"InstanceId")
419 .HasColumnType(
"bigint");
421 b.Property<
byte>(
"JobCode")
422 .HasColumnType(
"smallint");
424 b.Property<DateTimeOffset?>(
"StartedAt")
426 .HasColumnType(
"timestamp with time zone");
428 b.Property<
long>(
"StartedById")
429 .HasColumnType(
"bigint");
431 b.Property<DateTimeOffset?>(
"StoppedAt")
432 .HasColumnType(
"timestamp with time zone");
436 b.HasIndex(
"CancelledById");
438 b.HasIndex(
"InstanceId");
440 b.HasIndex(
"StartedById");
445 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
447 b.Property<
long>(
"Id")
448 .ValueGeneratedOnAdd()
449 .HasColumnType(
"bigint");
451 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
453 b.Property<
string>(
"ExternalUserId")
456 .HasColumnType(
"character varying(100)");
458 b.Property<
int>(
"Provider")
459 .HasColumnType(
"integer");
461 b.Property<
long>(
"UserId")
462 .HasColumnType(
"bigint");
466 b.HasIndex(
"UserId");
468 b.HasIndex(
"Provider",
"ExternalUserId")
471 b.ToTable(
"OAuthConnections");
474 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
476 b.Property<
long?>(
"Id")
477 .ValueGeneratedOnAdd()
478 .HasColumnType(
"bigint");
480 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
482 b.Property<decimal>(
"AdministrationRights")
483 .HasColumnType(
"numeric(20,0)");
485 b.Property<
long?>(
"GroupId")
486 .HasColumnType(
"bigint");
488 b.Property<decimal>(
"InstanceManagerRights")
489 .HasColumnType(
"numeric(20,0)");
491 b.Property<
long?>(
"UserId")
492 .HasColumnType(
"bigint");
496 b.HasIndex(
"GroupId")
502 b.ToTable(
"PermissionSets");
505 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
507 b.Property<
long?>(
"Id")
508 .ValueGeneratedOnAdd()
509 .HasColumnType(
"bigint");
511 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
513 b.Property<
string>(
"AccessIdentifier")
515 .HasColumnType(
"text");
517 b.Property<
long>(
"CompileJobId")
518 .HasColumnType(
"bigint");
520 b.Property<
long?>(
"InitialCompileJobId")
521 .HasColumnType(
"bigint");
523 b.Property<
int>(
"LaunchSecurityLevel")
524 .HasColumnType(
"integer");
526 b.Property<
int>(
"LaunchVisibility")
527 .HasColumnType(
"integer");
529 b.Property<
int>(
"Port")
530 .HasColumnType(
"integer");
532 b.Property<
int>(
"ProcessId")
533 .HasColumnType(
"integer");
535 b.Property<
int>(
"RebootState")
536 .HasColumnType(
"integer");
538 b.Property<
int?>(
"TopicPort")
539 .HasColumnType(
"integer");
543 b.HasIndex(
"CompileJobId");
545 b.HasIndex(
"InitialCompileJobId");
547 b.ToTable(
"ReattachInformations");
550 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
552 b.Property<
long>(
"Id")
553 .ValueGeneratedOnAdd()
554 .HasColumnType(
"bigint");
556 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
558 b.Property<
string>(
"AccessToken")
560 .HasColumnType(
"character varying(10000)");
562 b.Property<
string>(
"AccessUser")
564 .HasColumnType(
"character varying(10000)");
566 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
568 .HasColumnType(
"boolean");
570 b.Property<
bool?>(
"AutoUpdatesSynchronize")
572 .HasColumnType(
"boolean");
574 b.Property<
string>(
"CommitterEmail")
577 .HasColumnType(
"character varying(10000)");
579 b.Property<
string>(
"CommitterName")
582 .HasColumnType(
"character varying(10000)");
584 b.Property<
bool?>(
"CreateGitHubDeployments")
586 .HasColumnType(
"boolean");
588 b.Property<
long>(
"InstanceId")
589 .HasColumnType(
"bigint");
591 b.Property<
bool?>(
"PostTestMergeComment")
593 .HasColumnType(
"boolean");
595 b.Property<
bool?>(
"PushTestMergeCommits")
597 .HasColumnType(
"boolean");
599 b.Property<
bool?>(
"ShowTestMergeCommitters")
601 .HasColumnType(
"boolean");
603 b.Property<
bool?>(
"UpdateSubmodules")
605 .HasColumnType(
"boolean");
609 b.HasIndex(
"InstanceId")
612 b.ToTable(
"RepositorySettings");
615 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
617 b.Property<
long>(
"Id")
618 .ValueGeneratedOnAdd()
619 .HasColumnType(
"bigint");
621 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
623 b.Property<
long>(
"RevisionInformationId")
624 .HasColumnType(
"bigint");
626 b.Property<
long>(
"TestMergeId")
627 .HasColumnType(
"bigint");
631 b.HasIndex(
"RevisionInformationId");
633 b.HasIndex(
"TestMergeId");
635 b.ToTable(
"RevInfoTestMerges");
638 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
640 b.Property<
long>(
"Id")
641 .ValueGeneratedOnAdd()
642 .HasColumnType(
"bigint");
644 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
646 b.Property<
string>(
"CommitSha")
649 .HasColumnType(
"character varying(40)");
651 b.Property<
long>(
"InstanceId")
652 .HasColumnType(
"bigint");
654 b.Property<
string>(
"OriginCommitSha")
657 .HasColumnType(
"character varying(40)");
659 b.Property<DateTimeOffset>(
"Timestamp")
660 .HasColumnType(
"timestamp with time zone");
664 b.HasIndex(
"InstanceId",
"CommitSha")
667 b.ToTable(
"RevisionInformations");
670 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
672 b.Property<
long>(
"Id")
673 .ValueGeneratedOnAdd()
674 .HasColumnType(
"bigint");
676 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
678 b.Property<
string>(
"Author")
680 .HasColumnType(
"text");
682 b.Property<
string>(
"BodyAtMerge")
684 .HasColumnType(
"text");
686 b.Property<
string>(
"Comment")
688 .HasColumnType(
"character varying(10000)");
690 b.Property<DateTimeOffset>(
"MergedAt")
691 .HasColumnType(
"timestamp with time zone");
693 b.Property<
long>(
"MergedById")
694 .HasColumnType(
"bigint");
696 b.Property<
int>(
"Number")
697 .HasColumnType(
"integer");
699 b.Property<
long?>(
"PrimaryRevisionInformationId")
701 .HasColumnType(
"bigint");
703 b.Property<
string>(
"TargetCommitSha")
706 .HasColumnType(
"character varying(40)");
708 b.Property<
string>(
"TitleAtMerge")
710 .HasColumnType(
"text");
712 b.Property<
string>(
"Url")
714 .HasColumnType(
"text");
718 b.HasIndex(
"MergedById");
720 b.HasIndex(
"PrimaryRevisionInformationId")
723 b.ToTable(
"TestMerges");
726 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
728 b.Property<
long?>(
"Id")
729 .ValueGeneratedOnAdd()
730 .HasColumnType(
"bigint");
732 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
734 b.Property<
string>(
"CanonicalName")
737 .HasColumnType(
"character varying(100)");
739 b.Property<DateTimeOffset?>(
"CreatedAt")
741 .HasColumnType(
"timestamp with time zone");
743 b.Property<
long?>(
"CreatedById")
744 .HasColumnType(
"bigint");
746 b.Property<
bool?>(
"Enabled")
748 .HasColumnType(
"boolean");
750 b.Property<
long?>(
"GroupId")
751 .HasColumnType(
"bigint");
753 b.Property<DateTimeOffset?>(
"LastPasswordUpdate")
754 .HasColumnType(
"timestamp with time zone");
756 b.Property<
string>(
"Name")
759 .HasColumnType(
"character varying(100)");
761 b.Property<
string>(
"PasswordHash")
762 .HasColumnType(
"text");
764 b.Property<
string>(
"SystemIdentifier")
766 .HasColumnType(
"character varying(100)");
770 b.HasIndex(
"CanonicalName")
773 b.HasIndex(
"CreatedById");
775 b.HasIndex(
"GroupId");
777 b.HasIndex(
"SystemIdentifier")
783 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
785 b.Property<
long?>(
"Id")
786 .ValueGeneratedOnAdd()
787 .HasColumnType(
"bigint");
789 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
791 b.Property<
string>(
"Name")
794 .HasColumnType(
"character varying(100)");
804 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
806 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
807 .WithMany(
"ChatSettings")
808 .HasForeignKey(
"InstanceId")
809 .OnDelete(DeleteBehavior.Cascade)
812 b.Navigation(
"Instance");
815 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
817 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
818 .WithMany(
"Channels")
819 .HasForeignKey(
"ChatSettingsId")
820 .OnDelete(DeleteBehavior.Cascade)
823 b.Navigation(
"ChatSettings");
826 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
828 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
830 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
831 .OnDelete(DeleteBehavior.Cascade)
834 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
835 .WithMany(
"CompileJobs")
836 .HasForeignKey(
"RevisionInformationId")
837 .OnDelete(DeleteBehavior.Cascade)
842 b.Navigation(
"RevisionInformation");
845 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
847 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
848 .WithOne(
"DreamDaemonSettings")
849 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
850 .OnDelete(DeleteBehavior.Cascade)
853 b.Navigation(
"Instance");
856 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
858 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
859 .WithOne(
"DreamMakerSettings")
860 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
861 .OnDelete(DeleteBehavior.Cascade)
864 b.Navigation(
"Instance");
867 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
869 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
870 .WithMany(
"InstancePermissionSets")
871 .HasForeignKey(
"InstanceId")
872 .OnDelete(DeleteBehavior.Cascade)
875 b.HasOne(
"Tgstation.Server.Host.Models.PermissionSet",
"PermissionSet")
876 .WithMany(
"InstancePermissionSets")
877 .HasForeignKey(
"PermissionSetId")
878 .OnDelete(DeleteBehavior.Cascade)
881 b.Navigation(
"Instance");
883 b.Navigation(
"PermissionSet");
886 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
888 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
890 .HasForeignKey(
"CancelledById");
892 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
894 .HasForeignKey(
"InstanceId")
895 .OnDelete(DeleteBehavior.Cascade)
898 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
900 .HasForeignKey(
"StartedById")
901 .OnDelete(DeleteBehavior.Cascade)
904 b.Navigation(
"CancelledBy");
906 b.Navigation(
"Instance");
908 b.Navigation(
"StartedBy");
911 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
913 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
914 .WithMany(
"OAuthConnections")
915 .HasForeignKey(
"UserId")
916 .OnDelete(DeleteBehavior.Cascade)
919 b.Navigation(
"User");
922 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
924 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
925 .WithOne(
"PermissionSet")
926 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"GroupId")
927 .OnDelete(DeleteBehavior.Cascade);
929 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
930 .WithOne(
"PermissionSet")
931 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"UserId")
932 .OnDelete(DeleteBehavior.Cascade);
934 b.Navigation(
"Group");
936 b.Navigation(
"User");
939 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
941 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
943 .HasForeignKey(
"CompileJobId")
944 .OnDelete(DeleteBehavior.Cascade)
947 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"InitialCompileJob")
949 .HasForeignKey(
"InitialCompileJobId");
951 b.Navigation(
"CompileJob");
953 b.Navigation(
"InitialCompileJob");
956 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
958 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
959 .WithOne(
"RepositorySettings")
960 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
961 .OnDelete(DeleteBehavior.Cascade)
964 b.Navigation(
"Instance");
967 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
969 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
970 .WithMany(
"ActiveTestMerges")
971 .HasForeignKey(
"RevisionInformationId")
972 .OnDelete(DeleteBehavior.Cascade)
975 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
976 .WithMany(
"RevisonInformations")
977 .HasForeignKey(
"TestMergeId")
978 .OnDelete(DeleteBehavior.ClientNoAction)
981 b.Navigation(
"RevisionInformation");
983 b.Navigation(
"TestMerge");
986 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
988 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
989 .WithMany(
"RevisionInformations")
990 .HasForeignKey(
"InstanceId")
991 .OnDelete(DeleteBehavior.Cascade)
994 b.Navigation(
"Instance");
997 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
999 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
1000 .WithMany(
"TestMerges")
1001 .HasForeignKey(
"MergedById")
1002 .OnDelete(DeleteBehavior.Restrict)
1005 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
1006 .WithOne(
"PrimaryTestMerge")
1007 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
1008 .OnDelete(DeleteBehavior.Cascade)
1011 b.Navigation(
"MergedBy");
1013 b.Navigation(
"PrimaryRevisionInformation");
1016 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
1018 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
1019 .WithMany(
"CreatedUsers")
1020 .HasForeignKey(
"CreatedById");
1022 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
1024 .HasForeignKey(
"GroupId");
1026 b.Navigation(
"CreatedBy");
1028 b.Navigation(
"Group");
1031 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
1033 b.Navigation(
"Channels");
1036 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
1038 b.Navigation(
"ChatSettings");
1040 b.Navigation(
"DreamDaemonSettings");
1042 b.Navigation(
"DreamMakerSettings");
1044 b.Navigation(
"InstancePermissionSets");
1046 b.Navigation(
"Jobs");
1048 b.Navigation(
"RepositorySettings");
1050 b.Navigation(
"RevisionInformations");
1053 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
1055 b.Navigation(
"InstancePermissionSets");
1058 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
1060 b.Navigation(
"ActiveTestMerges");
1062 b.Navigation(
"CompileJobs");
1064 b.Navigation(
"PrimaryTestMerge");
1067 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
1069 b.Navigation(
"RevisonInformations");
1072 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
1074 b.Navigation(
"CreatedUsers");
1076 b.Navigation(
"OAuthConnections");
1078 b.Navigation(
"PermissionSet");
1080 b.Navigation(
"TestMerges");
1083 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
1085 b.Navigation(
"PermissionSet")
1088 b.Navigation(
"Users");
1090#pragma warning restore 612, 618