17#pragma warning disable 612, 618
19 .HasAnnotation(
"ProductVersion",
"8.0.0-rc.1.23419.6")
20 .HasAnnotation(
"Relational:MaxIdentifierLength", 63);
22 NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
24 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
26 b.Property<
long?>(
"Id")
27 .ValueGeneratedOnAdd()
28 .HasColumnType(
"bigint");
30 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
32 b.Property<
int>(
"ChannelLimit")
33 .HasColumnType(
"integer");
35 b.Property<
string>(
"ConnectionString")
38 .HasColumnType(
"character varying(10000)");
40 b.Property<
bool?>(
"Enabled")
41 .HasColumnType(
"boolean");
43 b.Property<
long>(
"InstanceId")
44 .HasColumnType(
"bigint");
46 b.Property<
string>(
"Name")
49 .HasColumnType(
"character varying(100)");
51 b.Property<
int>(
"Provider")
52 .HasColumnType(
"integer");
54 b.Property<
long>(
"ReconnectionInterval")
55 .HasColumnType(
"bigint");
59 b.HasIndex(
"InstanceId",
"Name")
62 b.ToTable(
"ChatBots");
65 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
67 b.Property<
long>(
"Id")
68 .ValueGeneratedOnAdd()
69 .HasColumnType(
"bigint");
71 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
73 b.Property<
long>(
"ChatSettingsId")
74 .HasColumnType(
"bigint");
76 b.Property<decimal?>(
"DiscordChannelId")
77 .HasColumnType(
"numeric(20,0)");
79 b.Property<
string>(
"IrcChannel")
81 .HasColumnType(
"character varying(100)");
83 b.Property<
bool?>(
"IsAdminChannel")
85 .HasColumnType(
"boolean");
87 b.Property<
bool?>(
"IsSystemChannel")
89 .HasColumnType(
"boolean");
91 b.Property<
bool?>(
"IsUpdatesChannel")
93 .HasColumnType(
"boolean");
95 b.Property<
bool?>(
"IsWatchdogChannel")
97 .HasColumnType(
"boolean");
99 b.Property<
string>(
"Tag")
101 .HasColumnType(
"character varying(10000)");
105 b.HasIndex(
"ChatSettingsId",
"DiscordChannelId")
108 b.HasIndex(
"ChatSettingsId",
"IrcChannel")
111 b.ToTable(
"ChatChannels");
114 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
116 b.Property<
long?>(
"Id")
117 .ValueGeneratedOnAdd()
118 .HasColumnType(
"bigint");
120 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
122 b.Property<
string>(
"ByondVersion")
124 .HasColumnType(
"text")
125 .HasColumnName(
"EngineVersion");
127 b.Property<
int?>(
"DMApiMajorVersion")
128 .HasColumnType(
"integer");
130 b.Property<
int?>(
"DMApiMinorVersion")
131 .HasColumnType(
"integer");
133 b.Property<
int?>(
"DMApiPatchVersion")
134 .HasColumnType(
"integer");
136 b.Property<Guid?>(
"DirectoryName")
138 .HasColumnType(
"uuid");
140 b.Property<
string>(
"DmeName")
142 .HasColumnType(
"text");
144 b.Property<
int?>(
"GitHubDeploymentId")
145 .HasColumnType(
"integer");
147 b.Property<
long?>(
"GitHubRepoId")
148 .HasColumnType(
"bigint");
150 b.Property<
long>(
"JobId")
151 .HasColumnType(
"bigint");
153 b.Property<
int?>(
"MinimumSecurityLevel")
154 .HasColumnType(
"integer");
156 b.Property<
string>(
"Output")
158 .HasColumnType(
"text");
160 b.Property<
string>(
"RepositoryOrigin")
161 .HasColumnType(
"text");
163 b.Property<
long>(
"RevisionInformationId")
164 .HasColumnType(
"bigint");
168 b.HasIndex(
"DirectoryName");
173 b.HasIndex(
"RevisionInformationId");
175 b.ToTable(
"CompileJobs");
178 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
180 b.Property<
long>(
"Id")
181 .ValueGeneratedOnAdd()
182 .HasColumnType(
"bigint");
184 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
186 b.Property<
string>(
"AdditionalParameters")
189 .HasColumnType(
"character varying(10000)");
191 b.Property<
bool?>(
"AllowWebClient")
193 .HasColumnType(
"boolean");
195 b.Property<
bool?>(
"AutoStart")
197 .HasColumnType(
"boolean");
199 b.Property<
bool?>(
"DumpOnHealthCheckRestart")
201 .HasColumnType(
"boolean");
203 b.Property<
long>(
"HealthCheckSeconds")
204 .HasColumnType(
"bigint");
206 b.Property<
long>(
"InstanceId")
207 .HasColumnType(
"bigint");
209 b.Property<
bool?>(
"LogOutput")
211 .HasColumnType(
"boolean");
213 b.Property<
long>(
"MapThreads")
214 .HasColumnType(
"bigint");
216 b.Property<
int>(
"Port")
217 .HasColumnType(
"integer");
219 b.Property<
int>(
"SecurityLevel")
220 .HasColumnType(
"integer");
222 b.Property<
bool?>(
"StartProfiler")
224 .HasColumnType(
"boolean");
226 b.Property<
long>(
"StartupTimeout")
227 .HasColumnType(
"bigint");
229 b.Property<
long>(
"TopicRequestTimeout")
230 .HasColumnType(
"bigint");
232 b.Property<
int>(
"Visibility")
233 .HasColumnType(
"integer");
237 b.HasIndex(
"InstanceId")
240 b.ToTable(
"DreamDaemonSettings");
243 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
245 b.Property<
long>(
"Id")
246 .ValueGeneratedOnAdd()
247 .HasColumnType(
"bigint");
249 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
251 b.Property<
int>(
"ApiValidationPort")
252 .HasColumnType(
"integer");
254 b.Property<
int>(
"ApiValidationSecurityLevel")
255 .HasColumnType(
"integer");
257 b.Property<
long>(
"InstanceId")
258 .HasColumnType(
"bigint");
260 b.Property<
string>(
"ProjectName")
262 .HasColumnType(
"character varying(10000)");
264 b.Property<
bool?>(
"RequireDMApiValidation")
266 .HasColumnType(
"boolean");
268 b.Property<TimeSpan?>(
"Timeout")
270 .HasColumnType(
"interval");
274 b.HasIndex(
"InstanceId")
277 b.ToTable(
"DreamMakerSettings");
280 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
282 b.Property<
long?>(
"Id")
283 .ValueGeneratedOnAdd()
284 .HasColumnType(
"bigint");
286 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
288 b.Property<
long>(
"AutoUpdateInterval")
289 .HasColumnType(
"bigint");
291 b.Property<
int>(
"ChatBotLimit")
292 .HasColumnType(
"integer");
294 b.Property<
int>(
"ConfigurationType")
295 .HasColumnType(
"integer");
297 b.Property<
string>(
"Name")
300 .HasColumnType(
"character varying(100)");
302 b.Property<
bool?>(
"Online")
304 .HasColumnType(
"boolean");
306 b.Property<
string>(
"Path")
308 .HasColumnType(
"text");
310 b.Property<
string>(
"SwarmIdentifer")
311 .HasColumnType(
"text");
315 b.HasIndex(
"Path",
"SwarmIdentifer")
318 b.ToTable(
"Instances");
321 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
323 b.Property<
long>(
"Id")
324 .ValueGeneratedOnAdd()
325 .HasColumnType(
"bigint");
327 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
329 b.Property<decimal>(
"ChatBotRights")
330 .HasColumnType(
"numeric(20,0)");
332 b.Property<decimal>(
"ConfigurationRights")
333 .HasColumnType(
"numeric(20,0)");
335 b.Property<decimal>(
"DreamDaemonRights")
336 .HasColumnType(
"numeric(20,0)");
338 b.Property<decimal>(
"DreamMakerRights")
339 .HasColumnType(
"numeric(20,0)");
341 b.Property<decimal>(
"EngineRights")
342 .HasColumnType(
"numeric(20,0)");
344 b.Property<
long>(
"InstanceId")
345 .HasColumnType(
"bigint");
347 b.Property<decimal>(
"InstancePermissionSetRights")
348 .HasColumnType(
"numeric(20,0)");
350 b.Property<
long>(
"PermissionSetId")
351 .HasColumnType(
"bigint");
353 b.Property<decimal>(
"RepositoryRights")
354 .HasColumnType(
"numeric(20,0)");
358 b.HasIndex(
"InstanceId");
360 b.HasIndex(
"PermissionSetId",
"InstanceId")
363 b.ToTable(
"InstancePermissionSets");
366 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
368 b.Property<
long?>(
"Id")
369 .ValueGeneratedOnAdd()
370 .HasColumnType(
"bigint");
372 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
374 b.Property<decimal?>(
"CancelRight")
375 .HasColumnType(
"numeric(20,0)");
377 b.Property<decimal?>(
"CancelRightsType")
378 .HasColumnType(
"numeric(20,0)");
380 b.Property<
bool?>(
"Cancelled")
382 .HasColumnType(
"boolean");
384 b.Property<
long?>(
"CancelledById")
385 .HasColumnType(
"bigint");
387 b.Property<
string>(
"Description")
389 .HasColumnType(
"text");
391 b.Property<
long?>(
"ErrorCode")
392 .HasColumnType(
"bigint");
394 b.Property<
string>(
"ExceptionDetails")
395 .HasColumnType(
"text");
397 b.Property<
long>(
"InstanceId")
398 .HasColumnType(
"bigint");
400 b.Property<
byte>(
"JobCode")
401 .HasColumnType(
"smallint");
403 b.Property<DateTimeOffset?>(
"StartedAt")
405 .HasColumnType(
"timestamp with time zone");
407 b.Property<
long>(
"StartedById")
408 .HasColumnType(
"bigint");
410 b.Property<DateTimeOffset?>(
"StoppedAt")
411 .HasColumnType(
"timestamp with time zone");
415 b.HasIndex(
"CancelledById");
417 b.HasIndex(
"InstanceId");
419 b.HasIndex(
"StartedById");
424 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
426 b.Property<
long>(
"Id")
427 .ValueGeneratedOnAdd()
428 .HasColumnType(
"bigint");
430 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
432 b.Property<
string>(
"ExternalUserId")
435 .HasColumnType(
"character varying(100)");
437 b.Property<
int>(
"Provider")
438 .HasColumnType(
"integer");
440 b.Property<
long?>(
"UserId")
441 .HasColumnType(
"bigint");
445 b.HasIndex(
"UserId");
447 b.HasIndex(
"Provider",
"ExternalUserId")
450 b.ToTable(
"OAuthConnections");
453 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
455 b.Property<
long?>(
"Id")
456 .ValueGeneratedOnAdd()
457 .HasColumnType(
"bigint");
459 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
461 b.Property<decimal>(
"AdministrationRights")
462 .HasColumnType(
"numeric(20,0)");
464 b.Property<
long?>(
"GroupId")
465 .HasColumnType(
"bigint");
467 b.Property<decimal>(
"InstanceManagerRights")
468 .HasColumnType(
"numeric(20,0)");
470 b.Property<
long?>(
"UserId")
471 .HasColumnType(
"bigint");
475 b.HasIndex(
"GroupId")
481 b.ToTable(
"PermissionSets");
484 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
486 b.Property<
long>(
"Id")
487 .ValueGeneratedOnAdd()
488 .HasColumnType(
"bigint");
490 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
492 b.Property<
string>(
"AccessIdentifier")
494 .HasColumnType(
"text");
496 b.Property<
long>(
"CompileJobId")
497 .HasColumnType(
"bigint");
499 b.Property<
long?>(
"InitialCompileJobId")
500 .HasColumnType(
"bigint");
502 b.Property<
int>(
"LaunchSecurityLevel")
503 .HasColumnType(
"integer");
505 b.Property<
int>(
"LaunchVisibility")
506 .HasColumnType(
"integer");
508 b.Property<
int>(
"Port")
509 .HasColumnType(
"integer");
511 b.Property<
int>(
"ProcessId")
512 .HasColumnType(
"integer");
514 b.Property<
int>(
"RebootState")
515 .HasColumnType(
"integer");
519 b.HasIndex(
"CompileJobId");
521 b.HasIndex(
"InitialCompileJobId");
523 b.ToTable(
"ReattachInformations");
526 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
528 b.Property<
long>(
"Id")
529 .ValueGeneratedOnAdd()
530 .HasColumnType(
"bigint");
532 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
534 b.Property<
string>(
"AccessToken")
536 .HasColumnType(
"character varying(10000)");
538 b.Property<
string>(
"AccessUser")
540 .HasColumnType(
"character varying(10000)");
542 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
544 .HasColumnType(
"boolean");
546 b.Property<
bool?>(
"AutoUpdatesSynchronize")
548 .HasColumnType(
"boolean");
550 b.Property<
string>(
"CommitterEmail")
553 .HasColumnType(
"character varying(10000)");
555 b.Property<
string>(
"CommitterName")
558 .HasColumnType(
"character varying(10000)");
560 b.Property<
bool?>(
"CreateGitHubDeployments")
562 .HasColumnType(
"boolean");
564 b.Property<
long>(
"InstanceId")
565 .HasColumnType(
"bigint");
567 b.Property<
bool?>(
"PostTestMergeComment")
569 .HasColumnType(
"boolean");
571 b.Property<
bool?>(
"PushTestMergeCommits")
573 .HasColumnType(
"boolean");
575 b.Property<
bool?>(
"ShowTestMergeCommitters")
577 .HasColumnType(
"boolean");
579 b.Property<
bool?>(
"UpdateSubmodules")
581 .HasColumnType(
"boolean");
585 b.HasIndex(
"InstanceId")
588 b.ToTable(
"RepositorySettings");
591 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
593 b.Property<
long>(
"Id")
594 .ValueGeneratedOnAdd()
595 .HasColumnType(
"bigint");
597 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
599 b.Property<
long>(
"RevisionInformationId")
600 .HasColumnType(
"bigint");
602 b.Property<
long>(
"TestMergeId")
603 .HasColumnType(
"bigint");
607 b.HasIndex(
"RevisionInformationId");
609 b.HasIndex(
"TestMergeId");
611 b.ToTable(
"RevInfoTestMerges");
614 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
616 b.Property<
long>(
"Id")
617 .ValueGeneratedOnAdd()
618 .HasColumnType(
"bigint");
620 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
622 b.Property<
string>(
"CommitSha")
625 .HasColumnType(
"character varying(40)");
627 b.Property<
long>(
"InstanceId")
628 .HasColumnType(
"bigint");
630 b.Property<
string>(
"OriginCommitSha")
633 .HasColumnType(
"character varying(40)");
635 b.Property<DateTimeOffset>(
"Timestamp")
636 .HasColumnType(
"timestamp with time zone");
640 b.HasIndex(
"InstanceId",
"CommitSha")
643 b.ToTable(
"RevisionInformations");
646 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
648 b.Property<
long>(
"Id")
649 .ValueGeneratedOnAdd()
650 .HasColumnType(
"bigint");
652 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
654 b.Property<
string>(
"Author")
656 .HasColumnType(
"text");
658 b.Property<
string>(
"BodyAtMerge")
660 .HasColumnType(
"text");
662 b.Property<
string>(
"Comment")
664 .HasColumnType(
"character varying(10000)");
666 b.Property<DateTimeOffset>(
"MergedAt")
667 .HasColumnType(
"timestamp with time zone");
669 b.Property<
long>(
"MergedById")
670 .HasColumnType(
"bigint");
672 b.Property<
int>(
"Number")
673 .HasColumnType(
"integer");
675 b.Property<
long?>(
"PrimaryRevisionInformationId")
677 .HasColumnType(
"bigint");
679 b.Property<
string>(
"TargetCommitSha")
682 .HasColumnType(
"character varying(40)");
684 b.Property<
string>(
"TitleAtMerge")
686 .HasColumnType(
"text");
688 b.Property<
string>(
"Url")
690 .HasColumnType(
"text");
694 b.HasIndex(
"MergedById");
696 b.HasIndex(
"PrimaryRevisionInformationId")
699 b.ToTable(
"TestMerges");
702 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
704 b.Property<
long?>(
"Id")
705 .ValueGeneratedOnAdd()
706 .HasColumnType(
"bigint");
708 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
710 b.Property<
string>(
"CanonicalName")
713 .HasColumnType(
"character varying(100)");
715 b.Property<DateTimeOffset?>(
"CreatedAt")
717 .HasColumnType(
"timestamp with time zone");
719 b.Property<
long?>(
"CreatedById")
720 .HasColumnType(
"bigint");
722 b.Property<
bool?>(
"Enabled")
724 .HasColumnType(
"boolean");
726 b.Property<
long?>(
"GroupId")
727 .HasColumnType(
"bigint");
729 b.Property<DateTimeOffset?>(
"LastPasswordUpdate")
730 .HasColumnType(
"timestamp with time zone");
732 b.Property<
string>(
"Name")
735 .HasColumnType(
"character varying(100)");
737 b.Property<
string>(
"PasswordHash")
738 .HasColumnType(
"text");
740 b.Property<
string>(
"SystemIdentifier")
742 .HasColumnType(
"character varying(100)");
746 b.HasIndex(
"CanonicalName")
749 b.HasIndex(
"CreatedById");
751 b.HasIndex(
"GroupId");
753 b.HasIndex(
"SystemIdentifier")
759 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
761 b.Property<
long?>(
"Id")
762 .ValueGeneratedOnAdd()
763 .HasColumnType(
"bigint");
765 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
767 b.Property<
string>(
"Name")
770 .HasColumnType(
"character varying(100)");
780 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
782 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
783 .WithMany(
"ChatSettings")
784 .HasForeignKey(
"InstanceId")
785 .OnDelete(DeleteBehavior.Cascade)
788 b.Navigation(
"Instance");
791 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
793 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
794 .WithMany(
"Channels")
795 .HasForeignKey(
"ChatSettingsId")
796 .OnDelete(DeleteBehavior.Cascade)
799 b.Navigation(
"ChatSettings");
802 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
804 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
806 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
807 .OnDelete(DeleteBehavior.Cascade)
810 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
811 .WithMany(
"CompileJobs")
812 .HasForeignKey(
"RevisionInformationId")
813 .OnDelete(DeleteBehavior.Cascade)
818 b.Navigation(
"RevisionInformation");
821 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
823 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
824 .WithOne(
"DreamDaemonSettings")
825 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
826 .OnDelete(DeleteBehavior.Cascade)
829 b.Navigation(
"Instance");
832 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
834 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
835 .WithOne(
"DreamMakerSettings")
836 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
837 .OnDelete(DeleteBehavior.Cascade)
840 b.Navigation(
"Instance");
843 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
845 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
846 .WithMany(
"InstancePermissionSets")
847 .HasForeignKey(
"InstanceId")
848 .OnDelete(DeleteBehavior.Cascade)
851 b.HasOne(
"Tgstation.Server.Host.Models.PermissionSet",
"PermissionSet")
852 .WithMany(
"InstancePermissionSets")
853 .HasForeignKey(
"PermissionSetId")
854 .OnDelete(DeleteBehavior.Cascade)
857 b.Navigation(
"Instance");
859 b.Navigation(
"PermissionSet");
862 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
864 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
866 .HasForeignKey(
"CancelledById");
868 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
870 .HasForeignKey(
"InstanceId")
871 .OnDelete(DeleteBehavior.Cascade)
874 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
876 .HasForeignKey(
"StartedById")
877 .OnDelete(DeleteBehavior.Cascade)
880 b.Navigation(
"CancelledBy");
882 b.Navigation(
"Instance");
884 b.Navigation(
"StartedBy");
887 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
889 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
890 .WithMany(
"OAuthConnections")
891 .HasForeignKey(
"UserId")
892 .OnDelete(DeleteBehavior.Cascade);
894 b.Navigation(
"User");
897 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
899 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
900 .WithOne(
"PermissionSet")
901 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"GroupId")
902 .OnDelete(DeleteBehavior.Cascade);
904 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
905 .WithOne(
"PermissionSet")
906 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"UserId")
907 .OnDelete(DeleteBehavior.Cascade);
909 b.Navigation(
"Group");
911 b.Navigation(
"User");
914 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
916 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
918 .HasForeignKey(
"CompileJobId")
919 .OnDelete(DeleteBehavior.Cascade)
922 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"InitialCompileJob")
924 .HasForeignKey(
"InitialCompileJobId");
926 b.Navigation(
"CompileJob");
928 b.Navigation(
"InitialCompileJob");
931 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
933 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
934 .WithOne(
"RepositorySettings")
935 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
936 .OnDelete(DeleteBehavior.Cascade)
939 b.Navigation(
"Instance");
942 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
944 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
945 .WithMany(
"ActiveTestMerges")
946 .HasForeignKey(
"RevisionInformationId")
947 .OnDelete(DeleteBehavior.Cascade)
950 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
951 .WithMany(
"RevisonInformations")
952 .HasForeignKey(
"TestMergeId")
953 .OnDelete(DeleteBehavior.ClientNoAction)
956 b.Navigation(
"RevisionInformation");
958 b.Navigation(
"TestMerge");
961 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
963 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
964 .WithMany(
"RevisionInformations")
965 .HasForeignKey(
"InstanceId")
966 .OnDelete(DeleteBehavior.Cascade)
969 b.Navigation(
"Instance");
972 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
974 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
975 .WithMany(
"TestMerges")
976 .HasForeignKey(
"MergedById")
977 .OnDelete(DeleteBehavior.Restrict)
980 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
981 .WithOne(
"PrimaryTestMerge")
982 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
983 .OnDelete(DeleteBehavior.Cascade)
986 b.Navigation(
"MergedBy");
988 b.Navigation(
"PrimaryRevisionInformation");
991 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
993 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
994 .WithMany(
"CreatedUsers")
995 .HasForeignKey(
"CreatedById");
997 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
999 .HasForeignKey(
"GroupId");
1001 b.Navigation(
"CreatedBy");
1003 b.Navigation(
"Group");
1006 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
1008 b.Navigation(
"Channels");
1011 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
1013 b.Navigation(
"ChatSettings");
1015 b.Navigation(
"DreamDaemonSettings");
1017 b.Navigation(
"DreamMakerSettings");
1019 b.Navigation(
"InstancePermissionSets");
1021 b.Navigation(
"Jobs");
1023 b.Navigation(
"RepositorySettings");
1025 b.Navigation(
"RevisionInformations");
1028 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
1030 b.Navigation(
"InstancePermissionSets");
1033 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
1035 b.Navigation(
"ActiveTestMerges");
1037 b.Navigation(
"CompileJobs");
1039 b.Navigation(
"PrimaryTestMerge");
1042 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
1044 b.Navigation(
"RevisonInformations");
1047 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
1049 b.Navigation(
"CreatedUsers");
1051 b.Navigation(
"OAuthConnections");
1053 b.Navigation(
"PermissionSet");
1055 b.Navigation(
"TestMerges");
1058 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
1060 b.Navigation(
"PermissionSet")
1063 b.Navigation(
"Users");
1065#pragma warning restore 612, 618