17#pragma warning disable 612, 618
19 .HasAnnotation(
"ProductVersion",
"8.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<
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<
long?>(
"GitHubDeploymentId")
144 .HasColumnType(
"bigint");
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>(
"OpenDreamTopicPort")
220 .HasColumnType(
"integer");
222 b.Property<
int>(
"Port")
223 .HasColumnType(
"integer");
225 b.Property<
int>(
"SecurityLevel")
226 .HasColumnType(
"integer");
228 b.Property<
bool?>(
"StartProfiler")
230 .HasColumnType(
"boolean");
232 b.Property<
long>(
"StartupTimeout")
233 .HasColumnType(
"bigint");
235 b.Property<
long>(
"TopicRequestTimeout")
236 .HasColumnType(
"bigint");
238 b.Property<
int>(
"Visibility")
239 .HasColumnType(
"integer");
243 b.HasIndex(
"InstanceId")
246 b.ToTable(
"DreamDaemonSettings");
249 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
251 b.Property<
long>(
"Id")
252 .ValueGeneratedOnAdd()
253 .HasColumnType(
"bigint");
255 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
257 b.Property<
int>(
"ApiValidationPort")
258 .HasColumnType(
"integer");
260 b.Property<
int>(
"ApiValidationSecurityLevel")
261 .HasColumnType(
"integer");
263 b.Property<
string>(
"CompilerAdditionalArguments")
265 .HasColumnType(
"character varying(10000)");
267 b.Property<
long>(
"InstanceId")
268 .HasColumnType(
"bigint");
270 b.Property<
string>(
"ProjectName")
272 .HasColumnType(
"character varying(10000)");
274 b.Property<
bool?>(
"RequireDMApiValidation")
276 .HasColumnType(
"boolean");
278 b.Property<TimeSpan?>(
"Timeout")
280 .HasColumnType(
"interval");
284 b.HasIndex(
"InstanceId")
287 b.ToTable(
"DreamMakerSettings");
290 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
292 b.Property<
long?>(
"Id")
293 .ValueGeneratedOnAdd()
294 .HasColumnType(
"bigint");
296 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
298 b.Property<
string>(
"AutoUpdateCron")
301 .HasColumnType(
"character varying(10000)");
303 b.Property<
long>(
"AutoUpdateInterval")
304 .HasColumnType(
"bigint");
306 b.Property<
int>(
"ChatBotLimit")
307 .HasColumnType(
"integer");
309 b.Property<
int>(
"ConfigurationType")
310 .HasColumnType(
"integer");
312 b.Property<
string>(
"Name")
315 .HasColumnType(
"character varying(100)");
317 b.Property<
bool?>(
"Online")
319 .HasColumnType(
"boolean");
321 b.Property<
string>(
"Path")
323 .HasColumnType(
"text");
325 b.Property<
string>(
"SwarmIdentifer")
326 .HasColumnType(
"text");
330 b.HasIndex(
"Path",
"SwarmIdentifer")
333 b.ToTable(
"Instances");
336 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
338 b.Property<
long>(
"Id")
339 .ValueGeneratedOnAdd()
340 .HasColumnType(
"bigint");
342 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
344 b.Property<decimal>(
"ChatBotRights")
345 .HasColumnType(
"numeric(20,0)");
347 b.Property<decimal>(
"ConfigurationRights")
348 .HasColumnType(
"numeric(20,0)");
350 b.Property<decimal>(
"DreamDaemonRights")
351 .HasColumnType(
"numeric(20,0)");
353 b.Property<decimal>(
"DreamMakerRights")
354 .HasColumnType(
"numeric(20,0)");
356 b.Property<decimal>(
"EngineRights")
357 .HasColumnType(
"numeric(20,0)");
359 b.Property<
long>(
"InstanceId")
360 .HasColumnType(
"bigint");
362 b.Property<decimal>(
"InstancePermissionSetRights")
363 .HasColumnType(
"numeric(20,0)");
365 b.Property<
long>(
"PermissionSetId")
366 .HasColumnType(
"bigint");
368 b.Property<decimal>(
"RepositoryRights")
369 .HasColumnType(
"numeric(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 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
389 b.Property<decimal?>(
"CancelRight")
390 .HasColumnType(
"numeric(20,0)");
392 b.Property<decimal?>(
"CancelRightsType")
393 .HasColumnType(
"numeric(20,0)");
395 b.Property<
bool?>(
"Cancelled")
397 .HasColumnType(
"boolean");
399 b.Property<
long?>(
"CancelledById")
400 .HasColumnType(
"bigint");
402 b.Property<
string>(
"Description")
404 .HasColumnType(
"text");
406 b.Property<
long?>(
"ErrorCode")
407 .HasColumnType(
"bigint");
409 b.Property<
string>(
"ExceptionDetails")
410 .HasColumnType(
"text");
412 b.Property<
long>(
"InstanceId")
413 .HasColumnType(
"bigint");
415 b.Property<
byte>(
"JobCode")
416 .HasColumnType(
"smallint");
418 b.Property<DateTimeOffset?>(
"StartedAt")
420 .HasColumnType(
"timestamp with time zone");
422 b.Property<
long>(
"StartedById")
423 .HasColumnType(
"bigint");
425 b.Property<DateTimeOffset?>(
"StoppedAt")
426 .HasColumnType(
"timestamp with time zone");
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 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
447 b.Property<
string>(
"ExternalUserId")
450 .HasColumnType(
"character varying(100)");
452 b.Property<
int>(
"Provider")
453 .HasColumnType(
"integer");
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 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
476 b.Property<decimal>(
"AdministrationRights")
477 .HasColumnType(
"numeric(20,0)");
479 b.Property<
long?>(
"GroupId")
480 .HasColumnType(
"bigint");
482 b.Property<decimal>(
"InstanceManagerRights")
483 .HasColumnType(
"numeric(20,0)");
485 b.Property<
long?>(
"UserId")
486 .HasColumnType(
"bigint");
490 b.HasIndex(
"GroupId")
496 b.ToTable(
"PermissionSets");
499 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
501 b.Property<
long?>(
"Id")
502 .ValueGeneratedOnAdd()
503 .HasColumnType(
"bigint");
505 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
507 b.Property<
string>(
"AccessIdentifier")
509 .HasColumnType(
"text");
511 b.Property<
long>(
"CompileJobId")
512 .HasColumnType(
"bigint");
514 b.Property<
long?>(
"InitialCompileJobId")
515 .HasColumnType(
"bigint");
517 b.Property<
int>(
"LaunchSecurityLevel")
518 .HasColumnType(
"integer");
520 b.Property<
int>(
"LaunchVisibility")
521 .HasColumnType(
"integer");
523 b.Property<
int>(
"Port")
524 .HasColumnType(
"integer");
526 b.Property<
int>(
"ProcessId")
527 .HasColumnType(
"integer");
529 b.Property<
int>(
"RebootState")
530 .HasColumnType(
"integer");
532 b.Property<
int?>(
"TopicPort")
533 .HasColumnType(
"integer");
537 b.HasIndex(
"CompileJobId");
539 b.HasIndex(
"InitialCompileJobId");
541 b.ToTable(
"ReattachInformations");
544 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
546 b.Property<
long>(
"Id")
547 .ValueGeneratedOnAdd()
548 .HasColumnType(
"bigint");
550 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
552 b.Property<
string>(
"AccessToken")
554 .HasColumnType(
"character varying(10000)");
556 b.Property<
string>(
"AccessUser")
558 .HasColumnType(
"character varying(10000)");
560 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
562 .HasColumnType(
"boolean");
564 b.Property<
bool?>(
"AutoUpdatesSynchronize")
566 .HasColumnType(
"boolean");
568 b.Property<
string>(
"CommitterEmail")
571 .HasColumnType(
"character varying(10000)");
573 b.Property<
string>(
"CommitterName")
576 .HasColumnType(
"character varying(10000)");
578 b.Property<
bool?>(
"CreateGitHubDeployments")
580 .HasColumnType(
"boolean");
582 b.Property<
long>(
"InstanceId")
583 .HasColumnType(
"bigint");
585 b.Property<
bool?>(
"PostTestMergeComment")
587 .HasColumnType(
"boolean");
589 b.Property<
bool?>(
"PushTestMergeCommits")
591 .HasColumnType(
"boolean");
593 b.Property<
bool?>(
"ShowTestMergeCommitters")
595 .HasColumnType(
"boolean");
597 b.Property<
bool?>(
"UpdateSubmodules")
599 .HasColumnType(
"boolean");
603 b.HasIndex(
"InstanceId")
606 b.ToTable(
"RepositorySettings");
609 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
611 b.Property<
long>(
"Id")
612 .ValueGeneratedOnAdd()
613 .HasColumnType(
"bigint");
615 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
617 b.Property<
long>(
"RevisionInformationId")
618 .HasColumnType(
"bigint");
620 b.Property<
long>(
"TestMergeId")
621 .HasColumnType(
"bigint");
625 b.HasIndex(
"RevisionInformationId");
627 b.HasIndex(
"TestMergeId");
629 b.ToTable(
"RevInfoTestMerges");
632 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
634 b.Property<
long>(
"Id")
635 .ValueGeneratedOnAdd()
636 .HasColumnType(
"bigint");
638 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
640 b.Property<
string>(
"CommitSha")
643 .HasColumnType(
"character varying(40)");
645 b.Property<
long>(
"InstanceId")
646 .HasColumnType(
"bigint");
648 b.Property<
string>(
"OriginCommitSha")
651 .HasColumnType(
"character varying(40)");
653 b.Property<DateTimeOffset>(
"Timestamp")
654 .HasColumnType(
"timestamp with time zone");
658 b.HasIndex(
"InstanceId",
"CommitSha")
661 b.ToTable(
"RevisionInformations");
664 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
666 b.Property<
long>(
"Id")
667 .ValueGeneratedOnAdd()
668 .HasColumnType(
"bigint");
670 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
672 b.Property<
string>(
"Author")
674 .HasColumnType(
"text");
676 b.Property<
string>(
"BodyAtMerge")
678 .HasColumnType(
"text");
680 b.Property<
string>(
"Comment")
682 .HasColumnType(
"character varying(10000)");
684 b.Property<DateTimeOffset>(
"MergedAt")
685 .HasColumnType(
"timestamp with time zone");
687 b.Property<
long>(
"MergedById")
688 .HasColumnType(
"bigint");
690 b.Property<
int>(
"Number")
691 .HasColumnType(
"integer");
693 b.Property<
long?>(
"PrimaryRevisionInformationId")
695 .HasColumnType(
"bigint");
697 b.Property<
string>(
"TargetCommitSha")
700 .HasColumnType(
"character varying(40)");
702 b.Property<
string>(
"TitleAtMerge")
704 .HasColumnType(
"text");
706 b.Property<
string>(
"Url")
708 .HasColumnType(
"text");
712 b.HasIndex(
"MergedById");
714 b.HasIndex(
"PrimaryRevisionInformationId")
717 b.ToTable(
"TestMerges");
720 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
722 b.Property<
long?>(
"Id")
723 .ValueGeneratedOnAdd()
724 .HasColumnType(
"bigint");
726 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
728 b.Property<
string>(
"CanonicalName")
731 .HasColumnType(
"character varying(100)");
733 b.Property<DateTimeOffset?>(
"CreatedAt")
735 .HasColumnType(
"timestamp with time zone");
737 b.Property<
long?>(
"CreatedById")
738 .HasColumnType(
"bigint");
740 b.Property<
bool?>(
"Enabled")
742 .HasColumnType(
"boolean");
744 b.Property<
long?>(
"GroupId")
745 .HasColumnType(
"bigint");
747 b.Property<DateTimeOffset?>(
"LastPasswordUpdate")
748 .HasColumnType(
"timestamp with time zone");
750 b.Property<
string>(
"Name")
753 .HasColumnType(
"character varying(100)");
755 b.Property<
string>(
"PasswordHash")
756 .HasColumnType(
"text");
758 b.Property<
string>(
"SystemIdentifier")
760 .HasColumnType(
"character varying(100)");
764 b.HasIndex(
"CanonicalName")
767 b.HasIndex(
"CreatedById");
769 b.HasIndex(
"GroupId");
771 b.HasIndex(
"SystemIdentifier")
777 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
779 b.Property<
long?>(
"Id")
780 .ValueGeneratedOnAdd()
781 .HasColumnType(
"bigint");
783 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
785 b.Property<
string>(
"Name")
788 .HasColumnType(
"character varying(100)");
798 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
800 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
801 .WithMany(
"ChatSettings")
802 .HasForeignKey(
"InstanceId")
803 .OnDelete(DeleteBehavior.Cascade)
806 b.Navigation(
"Instance");
809 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
811 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
812 .WithMany(
"Channels")
813 .HasForeignKey(
"ChatSettingsId")
814 .OnDelete(DeleteBehavior.Cascade)
817 b.Navigation(
"ChatSettings");
820 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
822 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
824 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
825 .OnDelete(DeleteBehavior.Cascade)
828 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
829 .WithMany(
"CompileJobs")
830 .HasForeignKey(
"RevisionInformationId")
831 .OnDelete(DeleteBehavior.Cascade)
836 b.Navigation(
"RevisionInformation");
839 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
841 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
842 .WithOne(
"DreamDaemonSettings")
843 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
844 .OnDelete(DeleteBehavior.Cascade)
847 b.Navigation(
"Instance");
850 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
852 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
853 .WithOne(
"DreamMakerSettings")
854 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
855 .OnDelete(DeleteBehavior.Cascade)
858 b.Navigation(
"Instance");
861 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
863 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
864 .WithMany(
"InstancePermissionSets")
865 .HasForeignKey(
"InstanceId")
866 .OnDelete(DeleteBehavior.Cascade)
869 b.HasOne(
"Tgstation.Server.Host.Models.PermissionSet",
"PermissionSet")
870 .WithMany(
"InstancePermissionSets")
871 .HasForeignKey(
"PermissionSetId")
872 .OnDelete(DeleteBehavior.Cascade)
875 b.Navigation(
"Instance");
877 b.Navigation(
"PermissionSet");
880 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
882 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
884 .HasForeignKey(
"CancelledById");
886 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
888 .HasForeignKey(
"InstanceId")
889 .OnDelete(DeleteBehavior.Cascade)
892 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
894 .HasForeignKey(
"StartedById")
895 .OnDelete(DeleteBehavior.Cascade)
898 b.Navigation(
"CancelledBy");
900 b.Navigation(
"Instance");
902 b.Navigation(
"StartedBy");
905 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
907 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
908 .WithMany(
"OAuthConnections")
909 .HasForeignKey(
"UserId")
910 .OnDelete(DeleteBehavior.Cascade);
912 b.Navigation(
"User");
915 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
917 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
918 .WithOne(
"PermissionSet")
919 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"GroupId")
920 .OnDelete(DeleteBehavior.Cascade);
922 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
923 .WithOne(
"PermissionSet")
924 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"UserId")
925 .OnDelete(DeleteBehavior.Cascade);
927 b.Navigation(
"Group");
929 b.Navigation(
"User");
932 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
934 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
936 .HasForeignKey(
"CompileJobId")
937 .OnDelete(DeleteBehavior.Cascade)
940 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"InitialCompileJob")
942 .HasForeignKey(
"InitialCompileJobId");
944 b.Navigation(
"CompileJob");
946 b.Navigation(
"InitialCompileJob");
949 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
951 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
952 .WithOne(
"RepositorySettings")
953 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
954 .OnDelete(DeleteBehavior.Cascade)
957 b.Navigation(
"Instance");
960 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
962 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
963 .WithMany(
"ActiveTestMerges")
964 .HasForeignKey(
"RevisionInformationId")
965 .OnDelete(DeleteBehavior.Cascade)
968 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
969 .WithMany(
"RevisonInformations")
970 .HasForeignKey(
"TestMergeId")
971 .OnDelete(DeleteBehavior.ClientNoAction)
974 b.Navigation(
"RevisionInformation");
976 b.Navigation(
"TestMerge");
979 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
981 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
982 .WithMany(
"RevisionInformations")
983 .HasForeignKey(
"InstanceId")
984 .OnDelete(DeleteBehavior.Cascade)
987 b.Navigation(
"Instance");
990 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
992 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
993 .WithMany(
"TestMerges")
994 .HasForeignKey(
"MergedById")
995 .OnDelete(DeleteBehavior.Restrict)
998 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
999 .WithOne(
"PrimaryTestMerge")
1000 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
1001 .OnDelete(DeleteBehavior.Cascade)
1004 b.Navigation(
"MergedBy");
1006 b.Navigation(
"PrimaryRevisionInformation");
1009 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
1011 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
1012 .WithMany(
"CreatedUsers")
1013 .HasForeignKey(
"CreatedById");
1015 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
1017 .HasForeignKey(
"GroupId");
1019 b.Navigation(
"CreatedBy");
1021 b.Navigation(
"Group");
1024 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
1026 b.Navigation(
"Channels");
1029 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
1031 b.Navigation(
"ChatSettings");
1033 b.Navigation(
"DreamDaemonSettings");
1035 b.Navigation(
"DreamMakerSettings");
1037 b.Navigation(
"InstancePermissionSets");
1039 b.Navigation(
"Jobs");
1041 b.Navigation(
"RepositorySettings");
1043 b.Navigation(
"RevisionInformations");
1046 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
1048 b.Navigation(
"InstancePermissionSets");
1051 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
1053 b.Navigation(
"ActiveTestMerges");
1055 b.Navigation(
"CompileJobs");
1057 b.Navigation(
"PrimaryTestMerge");
1060 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
1062 b.Navigation(
"RevisonInformations");
1065 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
1067 b.Navigation(
"CreatedUsers");
1069 b.Navigation(
"OAuthConnections");
1071 b.Navigation(
"PermissionSet");
1073 b.Navigation(
"TestMerges");
1076 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
1078 b.Navigation(
"PermissionSet")
1081 b.Navigation(
"Users");
1083#pragma warning restore 612, 618