17#pragma warning disable 612, 618
19 .HasAnnotation(
"ProductVersion",
"8.0.0")
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<
int>(
"Port")
216 .HasColumnType(
"integer");
218 b.Property<
int>(
"SecurityLevel")
219 .HasColumnType(
"integer");
221 b.Property<
bool?>(
"StartProfiler")
223 .HasColumnType(
"boolean");
225 b.Property<
long>(
"StartupTimeout")
226 .HasColumnType(
"bigint");
228 b.Property<
long>(
"TopicRequestTimeout")
229 .HasColumnType(
"bigint");
231 b.Property<
int>(
"Visibility")
232 .HasColumnType(
"integer");
236 b.HasIndex(
"InstanceId")
239 b.ToTable(
"DreamDaemonSettings");
242 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
244 b.Property<
long>(
"Id")
245 .ValueGeneratedOnAdd()
246 .HasColumnType(
"bigint");
248 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
250 b.Property<
int>(
"ApiValidationPort")
251 .HasColumnType(
"integer");
253 b.Property<
int>(
"ApiValidationSecurityLevel")
254 .HasColumnType(
"integer");
256 b.Property<
long>(
"InstanceId")
257 .HasColumnType(
"bigint");
259 b.Property<
string>(
"ProjectName")
261 .HasColumnType(
"character varying(10000)");
263 b.Property<
bool?>(
"RequireDMApiValidation")
265 .HasColumnType(
"boolean");
267 b.Property<TimeSpan?>(
"Timeout")
269 .HasColumnType(
"interval");
273 b.HasIndex(
"InstanceId")
276 b.ToTable(
"DreamMakerSettings");
279 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
281 b.Property<
long?>(
"Id")
282 .ValueGeneratedOnAdd()
283 .HasColumnType(
"bigint");
285 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
287 b.Property<
long>(
"AutoUpdateInterval")
288 .HasColumnType(
"bigint");
290 b.Property<
int>(
"ChatBotLimit")
291 .HasColumnType(
"integer");
293 b.Property<
int>(
"ConfigurationType")
294 .HasColumnType(
"integer");
296 b.Property<
string>(
"Name")
299 .HasColumnType(
"character varying(100)");
301 b.Property<
bool?>(
"Online")
303 .HasColumnType(
"boolean");
305 b.Property<
string>(
"Path")
307 .HasColumnType(
"text");
309 b.Property<
string>(
"SwarmIdentifer")
310 .HasColumnType(
"text");
314 b.HasIndex(
"Path",
"SwarmIdentifer")
317 b.ToTable(
"Instances");
320 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
322 b.Property<
long>(
"Id")
323 .ValueGeneratedOnAdd()
324 .HasColumnType(
"bigint");
326 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
328 b.Property<decimal>(
"ChatBotRights")
329 .HasColumnType(
"numeric(20,0)");
331 b.Property<decimal>(
"ConfigurationRights")
332 .HasColumnType(
"numeric(20,0)");
334 b.Property<decimal>(
"DreamDaemonRights")
335 .HasColumnType(
"numeric(20,0)");
337 b.Property<decimal>(
"DreamMakerRights")
338 .HasColumnType(
"numeric(20,0)");
340 b.Property<decimal>(
"EngineRights")
341 .HasColumnType(
"numeric(20,0)");
343 b.Property<
long>(
"InstanceId")
344 .HasColumnType(
"bigint");
346 b.Property<decimal>(
"InstancePermissionSetRights")
347 .HasColumnType(
"numeric(20,0)");
349 b.Property<
long>(
"PermissionSetId")
350 .HasColumnType(
"bigint");
352 b.Property<decimal>(
"RepositoryRights")
353 .HasColumnType(
"numeric(20,0)");
357 b.HasIndex(
"InstanceId");
359 b.HasIndex(
"PermissionSetId",
"InstanceId")
362 b.ToTable(
"InstancePermissionSets");
365 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
367 b.Property<
long?>(
"Id")
368 .ValueGeneratedOnAdd()
369 .HasColumnType(
"bigint");
371 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
373 b.Property<decimal?>(
"CancelRight")
374 .HasColumnType(
"numeric(20,0)");
376 b.Property<decimal?>(
"CancelRightsType")
377 .HasColumnType(
"numeric(20,0)");
379 b.Property<
bool?>(
"Cancelled")
381 .HasColumnType(
"boolean");
383 b.Property<
long?>(
"CancelledById")
384 .HasColumnType(
"bigint");
386 b.Property<
string>(
"Description")
388 .HasColumnType(
"text");
390 b.Property<
long?>(
"ErrorCode")
391 .HasColumnType(
"bigint");
393 b.Property<
string>(
"ExceptionDetails")
394 .HasColumnType(
"text");
396 b.Property<
long>(
"InstanceId")
397 .HasColumnType(
"bigint");
399 b.Property<
byte>(
"JobCode")
400 .HasColumnType(
"smallint");
402 b.Property<DateTimeOffset?>(
"StartedAt")
404 .HasColumnType(
"timestamp with time zone");
406 b.Property<
long>(
"StartedById")
407 .HasColumnType(
"bigint");
409 b.Property<DateTimeOffset?>(
"StoppedAt")
410 .HasColumnType(
"timestamp with time zone");
414 b.HasIndex(
"CancelledById");
416 b.HasIndex(
"InstanceId");
418 b.HasIndex(
"StartedById");
423 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
425 b.Property<
long>(
"Id")
426 .ValueGeneratedOnAdd()
427 .HasColumnType(
"bigint");
429 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
431 b.Property<
string>(
"ExternalUserId")
434 .HasColumnType(
"character varying(100)");
436 b.Property<
int>(
"Provider")
437 .HasColumnType(
"integer");
439 b.Property<
long?>(
"UserId")
440 .HasColumnType(
"bigint");
444 b.HasIndex(
"UserId");
446 b.HasIndex(
"Provider",
"ExternalUserId")
449 b.ToTable(
"OAuthConnections");
452 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
454 b.Property<
long?>(
"Id")
455 .ValueGeneratedOnAdd()
456 .HasColumnType(
"bigint");
458 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
460 b.Property<decimal>(
"AdministrationRights")
461 .HasColumnType(
"numeric(20,0)");
463 b.Property<
long?>(
"GroupId")
464 .HasColumnType(
"bigint");
466 b.Property<decimal>(
"InstanceManagerRights")
467 .HasColumnType(
"numeric(20,0)");
469 b.Property<
long?>(
"UserId")
470 .HasColumnType(
"bigint");
474 b.HasIndex(
"GroupId")
480 b.ToTable(
"PermissionSets");
483 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
485 b.Property<
long?>(
"Id")
486 .ValueGeneratedOnAdd()
487 .HasColumnType(
"bigint");
489 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
491 b.Property<
string>(
"AccessIdentifier")
493 .HasColumnType(
"text");
495 b.Property<
long>(
"CompileJobId")
496 .HasColumnType(
"bigint");
498 b.Property<
long?>(
"InitialCompileJobId")
499 .HasColumnType(
"bigint");
501 b.Property<
int>(
"LaunchSecurityLevel")
502 .HasColumnType(
"integer");
504 b.Property<
int>(
"LaunchVisibility")
505 .HasColumnType(
"integer");
507 b.Property<
int>(
"Port")
508 .HasColumnType(
"integer");
510 b.Property<
int>(
"ProcessId")
511 .HasColumnType(
"integer");
513 b.Property<
int>(
"RebootState")
514 .HasColumnType(
"integer");
516 b.Property<
int?>(
"TopicPort")
517 .HasColumnType(
"integer");
521 b.HasIndex(
"CompileJobId");
523 b.HasIndex(
"InitialCompileJobId");
525 b.ToTable(
"ReattachInformations");
528 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
530 b.Property<
long>(
"Id")
531 .ValueGeneratedOnAdd()
532 .HasColumnType(
"bigint");
534 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
536 b.Property<
string>(
"AccessToken")
538 .HasColumnType(
"character varying(10000)");
540 b.Property<
string>(
"AccessUser")
542 .HasColumnType(
"character varying(10000)");
544 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
546 .HasColumnType(
"boolean");
548 b.Property<
bool?>(
"AutoUpdatesSynchronize")
550 .HasColumnType(
"boolean");
552 b.Property<
string>(
"CommitterEmail")
555 .HasColumnType(
"character varying(10000)");
557 b.Property<
string>(
"CommitterName")
560 .HasColumnType(
"character varying(10000)");
562 b.Property<
bool?>(
"CreateGitHubDeployments")
564 .HasColumnType(
"boolean");
566 b.Property<
long>(
"InstanceId")
567 .HasColumnType(
"bigint");
569 b.Property<
bool?>(
"PostTestMergeComment")
571 .HasColumnType(
"boolean");
573 b.Property<
bool?>(
"PushTestMergeCommits")
575 .HasColumnType(
"boolean");
577 b.Property<
bool?>(
"ShowTestMergeCommitters")
579 .HasColumnType(
"boolean");
581 b.Property<
bool?>(
"UpdateSubmodules")
583 .HasColumnType(
"boolean");
587 b.HasIndex(
"InstanceId")
590 b.ToTable(
"RepositorySettings");
593 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
595 b.Property<
long>(
"Id")
596 .ValueGeneratedOnAdd()
597 .HasColumnType(
"bigint");
599 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
601 b.Property<
long>(
"RevisionInformationId")
602 .HasColumnType(
"bigint");
604 b.Property<
long>(
"TestMergeId")
605 .HasColumnType(
"bigint");
609 b.HasIndex(
"RevisionInformationId");
611 b.HasIndex(
"TestMergeId");
613 b.ToTable(
"RevInfoTestMerges");
616 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
618 b.Property<
long>(
"Id")
619 .ValueGeneratedOnAdd()
620 .HasColumnType(
"bigint");
622 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
624 b.Property<
string>(
"CommitSha")
627 .HasColumnType(
"character varying(40)");
629 b.Property<
long>(
"InstanceId")
630 .HasColumnType(
"bigint");
632 b.Property<
string>(
"OriginCommitSha")
635 .HasColumnType(
"character varying(40)");
637 b.Property<DateTimeOffset>(
"Timestamp")
638 .HasColumnType(
"timestamp with time zone");
642 b.HasIndex(
"InstanceId",
"CommitSha")
645 b.ToTable(
"RevisionInformations");
648 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
650 b.Property<
long>(
"Id")
651 .ValueGeneratedOnAdd()
652 .HasColumnType(
"bigint");
654 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
656 b.Property<
string>(
"Author")
658 .HasColumnType(
"text");
660 b.Property<
string>(
"BodyAtMerge")
662 .HasColumnType(
"text");
664 b.Property<
string>(
"Comment")
666 .HasColumnType(
"character varying(10000)");
668 b.Property<DateTimeOffset>(
"MergedAt")
669 .HasColumnType(
"timestamp with time zone");
671 b.Property<
long>(
"MergedById")
672 .HasColumnType(
"bigint");
674 b.Property<
int>(
"Number")
675 .HasColumnType(
"integer");
677 b.Property<
long?>(
"PrimaryRevisionInformationId")
679 .HasColumnType(
"bigint");
681 b.Property<
string>(
"TargetCommitSha")
684 .HasColumnType(
"character varying(40)");
686 b.Property<
string>(
"TitleAtMerge")
688 .HasColumnType(
"text");
690 b.Property<
string>(
"Url")
692 .HasColumnType(
"text");
696 b.HasIndex(
"MergedById");
698 b.HasIndex(
"PrimaryRevisionInformationId")
701 b.ToTable(
"TestMerges");
704 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
706 b.Property<
long?>(
"Id")
707 .ValueGeneratedOnAdd()
708 .HasColumnType(
"bigint");
710 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
712 b.Property<
string>(
"CanonicalName")
715 .HasColumnType(
"character varying(100)");
717 b.Property<DateTimeOffset?>(
"CreatedAt")
719 .HasColumnType(
"timestamp with time zone");
721 b.Property<
long?>(
"CreatedById")
722 .HasColumnType(
"bigint");
724 b.Property<
bool?>(
"Enabled")
726 .HasColumnType(
"boolean");
728 b.Property<
long?>(
"GroupId")
729 .HasColumnType(
"bigint");
731 b.Property<DateTimeOffset?>(
"LastPasswordUpdate")
732 .HasColumnType(
"timestamp with time zone");
734 b.Property<
string>(
"Name")
737 .HasColumnType(
"character varying(100)");
739 b.Property<
string>(
"PasswordHash")
740 .HasColumnType(
"text");
742 b.Property<
string>(
"SystemIdentifier")
744 .HasColumnType(
"character varying(100)");
748 b.HasIndex(
"CanonicalName")
751 b.HasIndex(
"CreatedById");
753 b.HasIndex(
"GroupId");
755 b.HasIndex(
"SystemIdentifier")
761 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
763 b.Property<
long?>(
"Id")
764 .ValueGeneratedOnAdd()
765 .HasColumnType(
"bigint");
767 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
769 b.Property<
string>(
"Name")
772 .HasColumnType(
"character varying(100)");
782 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
784 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
785 .WithMany(
"ChatSettings")
786 .HasForeignKey(
"InstanceId")
787 .OnDelete(DeleteBehavior.Cascade)
790 b.Navigation(
"Instance");
793 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
795 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
796 .WithMany(
"Channels")
797 .HasForeignKey(
"ChatSettingsId")
798 .OnDelete(DeleteBehavior.Cascade)
801 b.Navigation(
"ChatSettings");
804 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
806 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
808 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
809 .OnDelete(DeleteBehavior.Cascade)
812 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
813 .WithMany(
"CompileJobs")
814 .HasForeignKey(
"RevisionInformationId")
815 .OnDelete(DeleteBehavior.Cascade)
820 b.Navigation(
"RevisionInformation");
823 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
825 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
826 .WithOne(
"DreamDaemonSettings")
827 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
828 .OnDelete(DeleteBehavior.Cascade)
831 b.Navigation(
"Instance");
834 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
836 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
837 .WithOne(
"DreamMakerSettings")
838 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
839 .OnDelete(DeleteBehavior.Cascade)
842 b.Navigation(
"Instance");
845 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
847 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
848 .WithMany(
"InstancePermissionSets")
849 .HasForeignKey(
"InstanceId")
850 .OnDelete(DeleteBehavior.Cascade)
853 b.HasOne(
"Tgstation.Server.Host.Models.PermissionSet",
"PermissionSet")
854 .WithMany(
"InstancePermissionSets")
855 .HasForeignKey(
"PermissionSetId")
856 .OnDelete(DeleteBehavior.Cascade)
859 b.Navigation(
"Instance");
861 b.Navigation(
"PermissionSet");
864 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
866 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
868 .HasForeignKey(
"CancelledById");
870 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
872 .HasForeignKey(
"InstanceId")
873 .OnDelete(DeleteBehavior.Cascade)
876 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
878 .HasForeignKey(
"StartedById")
879 .OnDelete(DeleteBehavior.Cascade)
882 b.Navigation(
"CancelledBy");
884 b.Navigation(
"Instance");
886 b.Navigation(
"StartedBy");
889 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
891 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
892 .WithMany(
"OAuthConnections")
893 .HasForeignKey(
"UserId")
894 .OnDelete(DeleteBehavior.Cascade);
896 b.Navigation(
"User");
899 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
901 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
902 .WithOne(
"PermissionSet")
903 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"GroupId")
904 .OnDelete(DeleteBehavior.Cascade);
906 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
907 .WithOne(
"PermissionSet")
908 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"UserId")
909 .OnDelete(DeleteBehavior.Cascade);
911 b.Navigation(
"Group");
913 b.Navigation(
"User");
916 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
918 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
920 .HasForeignKey(
"CompileJobId")
921 .OnDelete(DeleteBehavior.Cascade)
924 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"InitialCompileJob")
926 .HasForeignKey(
"InitialCompileJobId");
928 b.Navigation(
"CompileJob");
930 b.Navigation(
"InitialCompileJob");
933 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
935 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
936 .WithOne(
"RepositorySettings")
937 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
938 .OnDelete(DeleteBehavior.Cascade)
941 b.Navigation(
"Instance");
944 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
946 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
947 .WithMany(
"ActiveTestMerges")
948 .HasForeignKey(
"RevisionInformationId")
949 .OnDelete(DeleteBehavior.Cascade)
952 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
953 .WithMany(
"RevisonInformations")
954 .HasForeignKey(
"TestMergeId")
955 .OnDelete(DeleteBehavior.ClientNoAction)
958 b.Navigation(
"RevisionInformation");
960 b.Navigation(
"TestMerge");
963 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
965 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
966 .WithMany(
"RevisionInformations")
967 .HasForeignKey(
"InstanceId")
968 .OnDelete(DeleteBehavior.Cascade)
971 b.Navigation(
"Instance");
974 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
976 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
977 .WithMany(
"TestMerges")
978 .HasForeignKey(
"MergedById")
979 .OnDelete(DeleteBehavior.Restrict)
982 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
983 .WithOne(
"PrimaryTestMerge")
984 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
985 .OnDelete(DeleteBehavior.Cascade)
988 b.Navigation(
"MergedBy");
990 b.Navigation(
"PrimaryRevisionInformation");
993 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
995 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
996 .WithMany(
"CreatedUsers")
997 .HasForeignKey(
"CreatedById");
999 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
1001 .HasForeignKey(
"GroupId");
1003 b.Navigation(
"CreatedBy");
1005 b.Navigation(
"Group");
1008 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
1010 b.Navigation(
"Channels");
1013 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
1015 b.Navigation(
"ChatSettings");
1017 b.Navigation(
"DreamDaemonSettings");
1019 b.Navigation(
"DreamMakerSettings");
1021 b.Navigation(
"InstancePermissionSets");
1023 b.Navigation(
"Jobs");
1025 b.Navigation(
"RepositorySettings");
1027 b.Navigation(
"RevisionInformations");
1030 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
1032 b.Navigation(
"InstancePermissionSets");
1035 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
1037 b.Navigation(
"ActiveTestMerges");
1039 b.Navigation(
"CompileJobs");
1041 b.Navigation(
"PrimaryTestMerge");
1044 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
1046 b.Navigation(
"RevisonInformations");
1049 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
1051 b.Navigation(
"CreatedUsers");
1053 b.Navigation(
"OAuthConnections");
1055 b.Navigation(
"PermissionSet");
1057 b.Navigation(
"TestMerges");
1060 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
1062 b.Navigation(
"PermissionSet")
1065 b.Navigation(
"Users");
1067#pragma warning restore 612, 618