17#pragma warning disable 612, 618
19 .HasAnnotation(
"ProductVersion",
"7.0.7")
20 .HasAnnotation(
"Relational:MaxIdentifierLength", 128);
22 SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
24 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
26 b.Property<
long?>(
"Id")
27 .ValueGeneratedOnAdd()
28 .HasColumnType(
"bigint");
30 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
32 b.Property<
int>(
"ChannelLimit")
33 .HasColumnType(
"int");
35 b.Property<
string>(
"ConnectionString")
38 .HasColumnType(
"nvarchar(max)");
40 b.Property<
bool?>(
"Enabled")
41 .HasColumnType(
"bit");
43 b.Property<
long>(
"InstanceId")
44 .HasColumnType(
"bigint");
46 b.Property<
string>(
"Name")
49 .HasColumnType(
"nvarchar(100)");
51 b.Property<
int>(
"Provider")
52 .HasColumnType(
"int");
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 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
73 b.Property<
long>(
"ChatSettingsId")
74 .HasColumnType(
"bigint");
76 b.Property<decimal?>(
"DiscordChannelId")
77 .HasColumnType(
"decimal(20,0)");
79 b.Property<
string>(
"IrcChannel")
81 .HasColumnType(
"nvarchar(100)");
83 b.Property<
bool?>(
"IsAdminChannel")
85 .HasColumnType(
"bit");
87 b.Property<
bool?>(
"IsSystemChannel")
89 .HasColumnType(
"bit");
91 b.Property<
bool?>(
"IsUpdatesChannel")
93 .HasColumnType(
"bit");
95 b.Property<
bool?>(
"IsWatchdogChannel")
97 .HasColumnType(
"bit");
99 b.Property<
string>(
"Tag")
101 .HasColumnType(
"nvarchar(max)");
105 b.HasIndex(
"ChatSettingsId",
"DiscordChannelId")
107 .HasFilter(
"[DiscordChannelId] IS NOT NULL");
109 b.HasIndex(
"ChatSettingsId",
"IrcChannel")
111 .HasFilter(
"[IrcChannel] IS NOT NULL");
113 b.ToTable(
"ChatChannels");
116 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
118 b.Property<
long?>(
"Id")
119 .ValueGeneratedOnAdd()
120 .HasColumnType(
"bigint");
122 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
124 b.Property<
string>(
"ByondVersion")
126 .HasColumnType(
"nvarchar(max)");
128 b.Property<
int?>(
"DMApiMajorVersion")
129 .HasColumnType(
"int");
131 b.Property<
int?>(
"DMApiMinorVersion")
132 .HasColumnType(
"int");
134 b.Property<
int?>(
"DMApiPatchVersion")
135 .HasColumnType(
"int");
137 b.Property<Guid?>(
"DirectoryName")
139 .HasColumnType(
"uniqueidentifier");
141 b.Property<
string>(
"DmeName")
143 .HasColumnType(
"nvarchar(max)");
145 b.Property<
int?>(
"GitHubDeploymentId")
146 .HasColumnType(
"int");
148 b.Property<
long?>(
"GitHubRepoId")
149 .HasColumnType(
"bigint");
151 b.Property<
long>(
"JobId")
152 .HasColumnType(
"bigint");
154 b.Property<
int?>(
"MinimumSecurityLevel")
155 .HasColumnType(
"int");
157 b.Property<
string>(
"Output")
159 .HasColumnType(
"nvarchar(max)");
161 b.Property<
string>(
"RepositoryOrigin")
162 .HasColumnType(
"nvarchar(max)");
164 b.Property<
long>(
"RevisionInformationId")
165 .HasColumnType(
"bigint");
169 b.HasIndex(
"DirectoryName");
174 b.HasIndex(
"RevisionInformationId");
176 b.ToTable(
"CompileJobs");
179 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
181 b.Property<
long>(
"Id")
182 .ValueGeneratedOnAdd()
183 .HasColumnType(
"bigint");
185 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
187 b.Property<
string>(
"AdditionalParameters")
190 .HasColumnType(
"nvarchar(max)");
192 b.Property<
bool?>(
"AllowWebClient")
194 .HasColumnType(
"bit");
196 b.Property<
bool?>(
"AutoStart")
198 .HasColumnType(
"bit");
200 b.Property<
bool?>(
"DumpOnHeartbeatRestart")
202 .HasColumnType(
"bit")
203 .HasColumnName(
"DumpOnHealthCheckRestart");
205 b.Property<
long>(
"HeartbeatSeconds")
206 .HasColumnType(
"bigint")
207 .HasColumnName(
"HealthCheckSeconds");
209 b.Property<
long>(
"InstanceId")
210 .HasColumnType(
"bigint");
212 b.Property<
bool?>(
"LogOutput")
214 .HasColumnType(
"bit");
216 b.Property<
int>(
"Port")
217 .HasColumnType(
"int");
219 b.Property<
int>(
"SecurityLevel")
220 .HasColumnType(
"int");
222 b.Property<
bool?>(
"StartProfiler")
224 .HasColumnType(
"bit");
226 b.Property<
long>(
"StartupTimeout")
227 .HasColumnType(
"bigint");
229 b.Property<
long>(
"TopicRequestTimeout")
230 .HasColumnType(
"bigint");
232 b.Property<
int>(
"Visibility")
233 .HasColumnType(
"int");
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 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
251 b.Property<
int>(
"ApiValidationPort")
252 .HasColumnType(
"int");
254 b.Property<
int>(
"ApiValidationSecurityLevel")
255 .HasColumnType(
"int");
257 b.Property<
long>(
"InstanceId")
258 .HasColumnType(
"bigint");
260 b.Property<
string>(
"ProjectName")
262 .HasColumnType(
"nvarchar(max)");
264 b.Property<
bool?>(
"RequireDMApiValidation")
266 .HasColumnType(
"bit");
268 b.Property<TimeSpan?>(
"Timeout")
270 .HasColumnType(
"time");
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 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
288 b.Property<
long>(
"AutoUpdateInterval")
289 .HasColumnType(
"bigint");
291 b.Property<
int>(
"ChatBotLimit")
292 .HasColumnType(
"int");
294 b.Property<
int>(
"ConfigurationType")
295 .HasColumnType(
"int");
297 b.Property<
string>(
"Name")
300 .HasColumnType(
"nvarchar(100)");
302 b.Property<
bool?>(
"Online")
304 .HasColumnType(
"bit");
306 b.Property<
string>(
"Path")
308 .HasColumnType(
"nvarchar(450)");
310 b.Property<
string>(
"SwarmIdentifer")
311 .HasColumnType(
"nvarchar(450)");
315 b.HasIndex(
"Path",
"SwarmIdentifer")
317 .HasFilter(
"[SwarmIdentifer] IS NOT NULL");
319 b.ToTable(
"Instances");
322 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
324 b.Property<
long>(
"Id")
325 .ValueGeneratedOnAdd()
326 .HasColumnType(
"bigint");
328 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
330 b.Property<decimal>(
"ByondRights")
331 .HasColumnType(
"decimal(20,0)");
333 b.Property<decimal>(
"ChatBotRights")
334 .HasColumnType(
"decimal(20,0)");
336 b.Property<decimal>(
"ConfigurationRights")
337 .HasColumnType(
"decimal(20,0)");
339 b.Property<decimal>(
"DreamDaemonRights")
340 .HasColumnType(
"decimal(20,0)");
342 b.Property<decimal>(
"DreamMakerRights")
343 .HasColumnType(
"decimal(20,0)");
345 b.Property<
long>(
"InstanceId")
346 .HasColumnType(
"bigint");
348 b.Property<decimal>(
"InstancePermissionSetRights")
349 .HasColumnType(
"decimal(20,0)");
351 b.Property<
long>(
"PermissionSetId")
352 .HasColumnType(
"bigint");
354 b.Property<decimal>(
"RepositoryRights")
355 .HasColumnType(
"decimal(20,0)");
359 b.HasIndex(
"InstanceId");
361 b.HasIndex(
"PermissionSetId",
"InstanceId")
364 b.ToTable(
"InstancePermissionSets");
367 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
369 b.Property<
long?>(
"Id")
370 .ValueGeneratedOnAdd()
371 .HasColumnType(
"bigint");
373 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
375 b.Property<decimal?>(
"CancelRight")
376 .HasColumnType(
"decimal(20,0)");
378 b.Property<decimal?>(
"CancelRightsType")
379 .HasColumnType(
"decimal(20,0)");
381 b.Property<
bool?>(
"Cancelled")
383 .HasColumnType(
"bit");
385 b.Property<
long?>(
"CancelledById")
386 .HasColumnType(
"bigint");
388 b.Property<
string>(
"Description")
390 .HasColumnType(
"nvarchar(max)");
392 b.Property<
long?>(
"ErrorCode")
393 .HasColumnType(
"bigint");
395 b.Property<
string>(
"ExceptionDetails")
396 .HasColumnType(
"nvarchar(max)");
398 b.Property<
long>(
"InstanceId")
399 .HasColumnType(
"bigint");
401 b.Property<DateTimeOffset?>(
"StartedAt")
403 .HasColumnType(
"datetimeoffset");
405 b.Property<
long>(
"StartedById")
406 .HasColumnType(
"bigint");
408 b.Property<DateTimeOffset?>(
"StoppedAt")
409 .HasColumnType(
"datetimeoffset");
413 b.HasIndex(
"CancelledById");
415 b.HasIndex(
"InstanceId");
417 b.HasIndex(
"StartedById");
422 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
424 b.Property<
long>(
"Id")
425 .ValueGeneratedOnAdd()
426 .HasColumnType(
"bigint");
428 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
430 b.Property<
string>(
"ExternalUserId")
433 .HasColumnType(
"nvarchar(100)");
435 b.Property<
int>(
"Provider")
436 .HasColumnType(
"int");
438 b.Property<
long?>(
"UserId")
439 .HasColumnType(
"bigint");
443 b.HasIndex(
"UserId");
445 b.HasIndex(
"Provider",
"ExternalUserId")
448 b.ToTable(
"OAuthConnections");
451 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
453 b.Property<
long?>(
"Id")
454 .ValueGeneratedOnAdd()
455 .HasColumnType(
"bigint");
457 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
459 b.Property<decimal>(
"AdministrationRights")
460 .HasColumnType(
"decimal(20,0)");
462 b.Property<
long?>(
"GroupId")
463 .HasColumnType(
"bigint");
465 b.Property<decimal>(
"InstanceManagerRights")
466 .HasColumnType(
"decimal(20,0)");
468 b.Property<
long?>(
"UserId")
469 .HasColumnType(
"bigint");
473 b.HasIndex(
"GroupId")
475 .HasFilter(
"[GroupId] IS NOT NULL");
479 .HasFilter(
"[UserId] IS NOT NULL");
481 b.ToTable(
"PermissionSets");
484 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
486 b.Property<
long>(
"Id")
487 .ValueGeneratedOnAdd()
488 .HasColumnType(
"bigint");
490 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
492 b.Property<
string>(
"AccessIdentifier")
494 .HasColumnType(
"nvarchar(max)");
496 b.Property<
long>(
"CompileJobId")
497 .HasColumnType(
"bigint");
499 b.Property<
long?>(
"InitialCompileJobId")
500 .HasColumnType(
"bigint");
502 b.Property<
int>(
"LaunchSecurityLevel")
503 .HasColumnType(
"int");
505 b.Property<
int>(
"LaunchVisibility")
506 .HasColumnType(
"int");
508 b.Property<
int>(
"Port")
509 .HasColumnType(
"int");
511 b.Property<
int>(
"ProcessId")
512 .HasColumnType(
"int");
514 b.Property<
int>(
"RebootState")
515 .HasColumnType(
"int");
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 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
534 b.Property<
string>(
"AccessToken")
536 .HasColumnType(
"nvarchar(max)");
538 b.Property<
string>(
"AccessUser")
540 .HasColumnType(
"nvarchar(max)");
542 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
544 .HasColumnType(
"bit");
546 b.Property<
bool?>(
"AutoUpdatesSynchronize")
548 .HasColumnType(
"bit");
550 b.Property<
string>(
"CommitterEmail")
553 .HasColumnType(
"nvarchar(max)");
555 b.Property<
string>(
"CommitterName")
558 .HasColumnType(
"nvarchar(max)");
560 b.Property<
bool?>(
"CreateGitHubDeployments")
562 .HasColumnType(
"bit");
564 b.Property<
long>(
"InstanceId")
565 .HasColumnType(
"bigint");
567 b.Property<
bool?>(
"PostTestMergeComment")
569 .HasColumnType(
"bit");
571 b.Property<
bool?>(
"PushTestMergeCommits")
573 .HasColumnType(
"bit");
575 b.Property<
bool?>(
"ShowTestMergeCommitters")
577 .HasColumnType(
"bit");
579 b.Property<
bool?>(
"UpdateSubmodules")
581 .HasColumnType(
"bit");
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 SqlServerPropertyBuilderExtensions.UseIdentityColumn(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 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
622 b.Property<
string>(
"CommitSha")
625 .HasColumnType(
"nvarchar(40)");
627 b.Property<
long>(
"InstanceId")
628 .HasColumnType(
"bigint");
630 b.Property<
string>(
"OriginCommitSha")
633 .HasColumnType(
"nvarchar(40)");
635 b.Property<DateTimeOffset>(
"Timestamp")
636 .HasColumnType(
"datetimeoffset");
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 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
654 b.Property<
string>(
"Author")
656 .HasColumnType(
"nvarchar(max)");
658 b.Property<
string>(
"BodyAtMerge")
660 .HasColumnType(
"nvarchar(max)");
662 b.Property<
string>(
"Comment")
664 .HasColumnType(
"nvarchar(max)");
666 b.Property<DateTimeOffset>(
"MergedAt")
667 .HasColumnType(
"datetimeoffset");
669 b.Property<
long>(
"MergedById")
670 .HasColumnType(
"bigint");
672 b.Property<
int>(
"Number")
673 .HasColumnType(
"int");
675 b.Property<
long?>(
"PrimaryRevisionInformationId")
677 .HasColumnType(
"bigint");
679 b.Property<
string>(
"TargetCommitSha")
682 .HasColumnType(
"nvarchar(40)");
684 b.Property<
string>(
"TitleAtMerge")
686 .HasColumnType(
"nvarchar(max)");
688 b.Property<
string>(
"Url")
690 .HasColumnType(
"nvarchar(max)");
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 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
710 b.Property<
string>(
"CanonicalName")
713 .HasColumnType(
"nvarchar(100)");
715 b.Property<DateTimeOffset?>(
"CreatedAt")
717 .HasColumnType(
"datetimeoffset");
719 b.Property<
long?>(
"CreatedById")
720 .HasColumnType(
"bigint");
722 b.Property<
bool?>(
"Enabled")
724 .HasColumnType(
"bit");
726 b.Property<
long?>(
"GroupId")
727 .HasColumnType(
"bigint");
729 b.Property<DateTimeOffset?>(
"LastPasswordUpdate")
730 .HasColumnType(
"datetimeoffset");
732 b.Property<
string>(
"Name")
735 .HasColumnType(
"nvarchar(100)");
737 b.Property<
string>(
"PasswordHash")
738 .HasColumnType(
"nvarchar(max)");
740 b.Property<
string>(
"SystemIdentifier")
742 .HasColumnType(
"nvarchar(100)");
746 b.HasIndex(
"CanonicalName")
749 b.HasIndex(
"CreatedById");
751 b.HasIndex(
"GroupId");
753 b.HasIndex(
"SystemIdentifier")
755 .HasFilter(
"[SystemIdentifier] IS NOT NULL");
760 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
762 b.Property<
long?>(
"Id")
763 .ValueGeneratedOnAdd()
764 .HasColumnType(
"bigint");
766 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
768 b.Property<
string>(
"Name")
771 .HasColumnType(
"nvarchar(100)");
781 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
783 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
784 .WithMany(
"ChatSettings")
785 .HasForeignKey(
"InstanceId")
786 .OnDelete(DeleteBehavior.Cascade)
789 b.Navigation(
"Instance");
792 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
794 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
795 .WithMany(
"Channels")
796 .HasForeignKey(
"ChatSettingsId")
797 .OnDelete(DeleteBehavior.Cascade)
800 b.Navigation(
"ChatSettings");
803 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
805 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
807 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
808 .OnDelete(DeleteBehavior.Cascade)
811 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
812 .WithMany(
"CompileJobs")
813 .HasForeignKey(
"RevisionInformationId")
814 .OnDelete(DeleteBehavior.ClientNoAction)
819 b.Navigation(
"RevisionInformation");
822 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
824 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
825 .WithOne(
"DreamDaemonSettings")
826 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
827 .OnDelete(DeleteBehavior.Cascade)
830 b.Navigation(
"Instance");
833 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
835 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
836 .WithOne(
"DreamMakerSettings")
837 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
838 .OnDelete(DeleteBehavior.Cascade)
841 b.Navigation(
"Instance");
844 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
846 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
847 .WithMany(
"InstancePermissionSets")
848 .HasForeignKey(
"InstanceId")
849 .OnDelete(DeleteBehavior.Cascade)
852 b.HasOne(
"Tgstation.Server.Host.Models.PermissionSet",
"PermissionSet")
853 .WithMany(
"InstancePermissionSets")
854 .HasForeignKey(
"PermissionSetId")
855 .OnDelete(DeleteBehavior.Cascade)
858 b.Navigation(
"Instance");
860 b.Navigation(
"PermissionSet");
863 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
865 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
867 .HasForeignKey(
"CancelledById");
869 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
871 .HasForeignKey(
"InstanceId")
872 .OnDelete(DeleteBehavior.Cascade)
875 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
877 .HasForeignKey(
"StartedById")
878 .OnDelete(DeleteBehavior.Cascade)
881 b.Navigation(
"CancelledBy");
883 b.Navigation(
"Instance");
885 b.Navigation(
"StartedBy");
888 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
890 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
891 .WithMany(
"OAuthConnections")
892 .HasForeignKey(
"UserId")
893 .OnDelete(DeleteBehavior.Cascade);
895 b.Navigation(
"User");
898 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
900 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
901 .WithOne(
"PermissionSet")
902 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"GroupId")
903 .OnDelete(DeleteBehavior.Cascade);
905 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
906 .WithOne(
"PermissionSet")
907 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"UserId")
908 .OnDelete(DeleteBehavior.Cascade);
910 b.Navigation(
"Group");
912 b.Navigation(
"User");
915 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
917 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
919 .HasForeignKey(
"CompileJobId")
920 .OnDelete(DeleteBehavior.Cascade)
923 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"InitialCompileJob")
925 .HasForeignKey(
"InitialCompileJobId");
927 b.Navigation(
"CompileJob");
929 b.Navigation(
"InitialCompileJob");
932 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
934 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
935 .WithOne(
"RepositorySettings")
936 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
937 .OnDelete(DeleteBehavior.Cascade)
940 b.Navigation(
"Instance");
943 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
945 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
946 .WithMany(
"ActiveTestMerges")
947 .HasForeignKey(
"RevisionInformationId")
948 .OnDelete(DeleteBehavior.Cascade)
951 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
952 .WithMany(
"RevisonInformations")
953 .HasForeignKey(
"TestMergeId")
954 .OnDelete(DeleteBehavior.ClientNoAction)
957 b.Navigation(
"RevisionInformation");
959 b.Navigation(
"TestMerge");
962 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
964 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
965 .WithMany(
"RevisionInformations")
966 .HasForeignKey(
"InstanceId")
967 .OnDelete(DeleteBehavior.Cascade)
970 b.Navigation(
"Instance");
973 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
975 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
976 .WithMany(
"TestMerges")
977 .HasForeignKey(
"MergedById")
978 .OnDelete(DeleteBehavior.Restrict)
981 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
982 .WithOne(
"PrimaryTestMerge")
983 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
984 .OnDelete(DeleteBehavior.Cascade)
987 b.Navigation(
"MergedBy");
989 b.Navigation(
"PrimaryRevisionInformation");
992 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
994 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
995 .WithMany(
"CreatedUsers")
996 .HasForeignKey(
"CreatedById");
998 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
1000 .HasForeignKey(
"GroupId");
1002 b.Navigation(
"CreatedBy");
1004 b.Navigation(
"Group");
1007 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
1009 b.Navigation(
"Channels");
1012 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
1014 b.Navigation(
"ChatSettings");
1016 b.Navigation(
"DreamDaemonSettings");
1018 b.Navigation(
"DreamMakerSettings");
1020 b.Navigation(
"InstancePermissionSets");
1022 b.Navigation(
"Jobs");
1024 b.Navigation(
"RepositorySettings");
1026 b.Navigation(
"RevisionInformations");
1029 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
1031 b.Navigation(
"InstancePermissionSets");
1034 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
1036 b.Navigation(
"ActiveTestMerges");
1038 b.Navigation(
"CompileJobs");
1040 b.Navigation(
"PrimaryTestMerge");
1043 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
1045 b.Navigation(
"RevisonInformations");
1048 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
1050 b.Navigation(
"CreatedUsers");
1052 b.Navigation(
"OAuthConnections");
1054 b.Navigation(
"PermissionSet");
1056 b.Navigation(
"TestMerges");
1059 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
1061 b.Navigation(
"PermissionSet")
1064 b.Navigation(
"Users");
1066#pragma warning restore 612, 618