17#pragma warning disable 612, 618
19 .HasAnnotation(
"ProductVersion",
"6.0.15")
20 .HasAnnotation(
"Relational:MaxIdentifierLength", 128);
22 SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
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"), 1L, 1);
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"), 1L, 1);
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?>(
"IsUpdatesChannel")
89 .HasColumnType(
"bit");
91 b.Property<
bool?>(
"IsWatchdogChannel")
93 .HasColumnType(
"bit");
95 b.Property<
string>(
"Tag")
97 .HasColumnType(
"nvarchar(max)");
101 b.HasIndex(
"ChatSettingsId",
"DiscordChannelId")
103 .HasFilter(
"[DiscordChannelId] IS NOT NULL");
105 b.HasIndex(
"ChatSettingsId",
"IrcChannel")
107 .HasFilter(
"[IrcChannel] IS NOT NULL");
109 b.ToTable(
"ChatChannels");
112 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
114 b.Property<
long?>(
"Id")
115 .ValueGeneratedOnAdd()
116 .HasColumnType(
"bigint");
118 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"), 1L, 1);
120 b.Property<
string>(
"ByondVersion")
122 .HasColumnType(
"nvarchar(max)");
124 b.Property<
int?>(
"DMApiMajorVersion")
125 .HasColumnType(
"int");
127 b.Property<
int?>(
"DMApiMinorVersion")
128 .HasColumnType(
"int");
130 b.Property<
int?>(
"DMApiPatchVersion")
131 .HasColumnType(
"int");
133 b.Property<Guid?>(
"DirectoryName")
135 .HasColumnType(
"uniqueidentifier");
137 b.Property<
string>(
"DmeName")
139 .HasColumnType(
"nvarchar(max)");
141 b.Property<
int?>(
"GitHubDeploymentId")
142 .HasColumnType(
"int");
144 b.Property<
long?>(
"GitHubRepoId")
145 .HasColumnType(
"bigint");
147 b.Property<
long>(
"JobId")
148 .HasColumnType(
"bigint");
150 b.Property<
int?>(
"MinimumSecurityLevel")
151 .HasColumnType(
"int");
153 b.Property<
string>(
"Output")
155 .HasColumnType(
"nvarchar(max)");
157 b.Property<
string>(
"RepositoryOrigin")
158 .HasColumnType(
"nvarchar(max)");
160 b.Property<
long>(
"RevisionInformationId")
161 .HasColumnType(
"bigint");
165 b.HasIndex(
"DirectoryName");
170 b.HasIndex(
"RevisionInformationId");
172 b.ToTable(
"CompileJobs");
175 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
177 b.Property<
long>(
"Id")
178 .ValueGeneratedOnAdd()
179 .HasColumnType(
"bigint");
181 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"), 1L, 1);
183 b.Property<
string>(
"AdditionalParameters")
186 .HasColumnType(
"nvarchar(max)");
188 b.Property<
bool?>(
"AllowWebClient")
190 .HasColumnType(
"bit");
192 b.Property<
bool?>(
"AutoStart")
194 .HasColumnType(
"bit");
196 b.Property<
bool?>(
"DumpOnHeartbeatRestart")
198 .HasColumnType(
"bit");
200 b.Property<
long>(
"HeartbeatSeconds")
201 .HasColumnType(
"bigint");
203 b.Property<
long>(
"InstanceId")
204 .HasColumnType(
"bigint");
206 b.Property<
bool?>(
"LogOutput")
208 .HasColumnType(
"bit");
210 b.Property<
int>(
"Port")
211 .HasColumnType(
"int");
213 b.Property<
int>(
"SecurityLevel")
214 .HasColumnType(
"int");
216 b.Property<
bool?>(
"StartProfiler")
218 .HasColumnType(
"bit");
220 b.Property<
long>(
"StartupTimeout")
221 .HasColumnType(
"bigint");
223 b.Property<
long>(
"TopicRequestTimeout")
224 .HasColumnType(
"bigint");
226 b.Property<
int>(
"Visibility")
227 .HasColumnType(
"int");
231 b.HasIndex(
"InstanceId")
234 b.ToTable(
"DreamDaemonSettings");
237 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
239 b.Property<
long>(
"Id")
240 .ValueGeneratedOnAdd()
241 .HasColumnType(
"bigint");
243 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"), 1L, 1);
245 b.Property<
int>(
"ApiValidationPort")
246 .HasColumnType(
"int");
248 b.Property<
int>(
"ApiValidationSecurityLevel")
249 .HasColumnType(
"int");
251 b.Property<
long>(
"InstanceId")
252 .HasColumnType(
"bigint");
254 b.Property<
string>(
"ProjectName")
256 .HasColumnType(
"nvarchar(max)");
258 b.Property<
bool?>(
"RequireDMApiValidation")
260 .HasColumnType(
"bit");
262 b.Property<TimeSpan?>(
"Timeout")
264 .HasColumnType(
"time");
268 b.HasIndex(
"InstanceId")
271 b.ToTable(
"DreamMakerSettings");
274 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
276 b.Property<
long?>(
"Id")
277 .ValueGeneratedOnAdd()
278 .HasColumnType(
"bigint");
280 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"), 1L, 1);
282 b.Property<
long>(
"AutoUpdateInterval")
283 .HasColumnType(
"bigint");
285 b.Property<
int>(
"ChatBotLimit")
286 .HasColumnType(
"int");
288 b.Property<
int>(
"ConfigurationType")
289 .HasColumnType(
"int");
291 b.Property<
string>(
"Name")
294 .HasColumnType(
"nvarchar(100)");
296 b.Property<
bool?>(
"Online")
298 .HasColumnType(
"bit");
300 b.Property<
string>(
"Path")
302 .HasColumnType(
"nvarchar(450)");
304 b.Property<
string>(
"SwarmIdentifer")
305 .HasColumnType(
"nvarchar(450)");
309 b.HasIndex(
"Path",
"SwarmIdentifer")
311 .HasFilter(
"[SwarmIdentifer] IS NOT NULL");
313 b.ToTable(
"Instances");
316 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
318 b.Property<
long>(
"Id")
319 .ValueGeneratedOnAdd()
320 .HasColumnType(
"bigint");
322 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"), 1L, 1);
324 b.Property<decimal>(
"ByondRights")
325 .HasColumnType(
"decimal(20,0)");
327 b.Property<decimal>(
"ChatBotRights")
328 .HasColumnType(
"decimal(20,0)");
330 b.Property<decimal>(
"ConfigurationRights")
331 .HasColumnType(
"decimal(20,0)");
333 b.Property<decimal>(
"DreamDaemonRights")
334 .HasColumnType(
"decimal(20,0)");
336 b.Property<decimal>(
"DreamMakerRights")
337 .HasColumnType(
"decimal(20,0)");
339 b.Property<
long>(
"InstanceId")
340 .HasColumnType(
"bigint");
342 b.Property<decimal>(
"InstancePermissionSetRights")
343 .HasColumnType(
"decimal(20,0)");
345 b.Property<
long>(
"PermissionSetId")
346 .HasColumnType(
"bigint");
348 b.Property<decimal>(
"RepositoryRights")
349 .HasColumnType(
"decimal(20,0)");
353 b.HasIndex(
"InstanceId");
355 b.HasIndex(
"PermissionSetId",
"InstanceId")
358 b.ToTable(
"InstancePermissionSets");
361 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
363 b.Property<
long?>(
"Id")
364 .ValueGeneratedOnAdd()
365 .HasColumnType(
"bigint");
367 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"), 1L, 1);
369 b.Property<decimal?>(
"CancelRight")
370 .HasColumnType(
"decimal(20,0)");
372 b.Property<decimal?>(
"CancelRightsType")
373 .HasColumnType(
"decimal(20,0)");
375 b.Property<
bool?>(
"Cancelled")
377 .HasColumnType(
"bit");
379 b.Property<
long?>(
"CancelledById")
380 .HasColumnType(
"bigint");
382 b.Property<
string>(
"Description")
384 .HasColumnType(
"nvarchar(max)");
386 b.Property<
long?>(
"ErrorCode")
387 .HasColumnType(
"bigint");
389 b.Property<
string>(
"ExceptionDetails")
390 .HasColumnType(
"nvarchar(max)");
392 b.Property<
long>(
"InstanceId")
393 .HasColumnType(
"bigint");
395 b.Property<DateTimeOffset?>(
"StartedAt")
397 .HasColumnType(
"datetimeoffset");
399 b.Property<
long>(
"StartedById")
400 .HasColumnType(
"bigint");
402 b.Property<DateTimeOffset?>(
"StoppedAt")
403 .HasColumnType(
"datetimeoffset");
407 b.HasIndex(
"CancelledById");
409 b.HasIndex(
"InstanceId");
411 b.HasIndex(
"StartedById");
416 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
418 b.Property<
long>(
"Id")
419 .ValueGeneratedOnAdd()
420 .HasColumnType(
"bigint");
422 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"), 1L, 1);
424 b.Property<
string>(
"ExternalUserId")
427 .HasColumnType(
"nvarchar(100)");
429 b.Property<
int>(
"Provider")
430 .HasColumnType(
"int");
432 b.Property<
long?>(
"UserId")
433 .HasColumnType(
"bigint");
437 b.HasIndex(
"UserId");
439 b.HasIndex(
"Provider",
"ExternalUserId")
442 b.ToTable(
"OAuthConnections");
445 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
447 b.Property<
long?>(
"Id")
448 .ValueGeneratedOnAdd()
449 .HasColumnType(
"bigint");
451 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"), 1L, 1);
453 b.Property<decimal>(
"AdministrationRights")
454 .HasColumnType(
"decimal(20,0)");
456 b.Property<
long?>(
"GroupId")
457 .HasColumnType(
"bigint");
459 b.Property<decimal>(
"InstanceManagerRights")
460 .HasColumnType(
"decimal(20,0)");
462 b.Property<
long?>(
"UserId")
463 .HasColumnType(
"bigint");
467 b.HasIndex(
"GroupId")
469 .HasFilter(
"[GroupId] IS NOT NULL");
473 .HasFilter(
"[UserId] IS NOT NULL");
475 b.ToTable(
"PermissionSets");
478 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
480 b.Property<
long>(
"Id")
481 .ValueGeneratedOnAdd()
482 .HasColumnType(
"bigint");
484 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"), 1L, 1);
486 b.Property<
string>(
"AccessIdentifier")
488 .HasColumnType(
"nvarchar(max)");
490 b.Property<
long>(
"CompileJobId")
491 .HasColumnType(
"bigint");
493 b.Property<
long?>(
"InitialCompileJobId")
494 .HasColumnType(
"bigint");
496 b.Property<
int>(
"LaunchSecurityLevel")
497 .HasColumnType(
"int");
499 b.Property<
int>(
"LaunchVisibility")
500 .HasColumnType(
"int");
502 b.Property<
int>(
"Port")
503 .HasColumnType(
"int");
505 b.Property<
int>(
"ProcessId")
506 .HasColumnType(
"int");
508 b.Property<
int>(
"RebootState")
509 .HasColumnType(
"int");
513 b.HasIndex(
"CompileJobId");
515 b.HasIndex(
"InitialCompileJobId");
517 b.ToTable(
"ReattachInformations");
520 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
522 b.Property<
long>(
"Id")
523 .ValueGeneratedOnAdd()
524 .HasColumnType(
"bigint");
526 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"), 1L, 1);
528 b.Property<
string>(
"AccessToken")
530 .HasColumnType(
"nvarchar(max)");
532 b.Property<
string>(
"AccessUser")
534 .HasColumnType(
"nvarchar(max)");
536 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
538 .HasColumnType(
"bit");
540 b.Property<
bool?>(
"AutoUpdatesSynchronize")
542 .HasColumnType(
"bit");
544 b.Property<
string>(
"CommitterEmail")
547 .HasColumnType(
"nvarchar(max)");
549 b.Property<
string>(
"CommitterName")
552 .HasColumnType(
"nvarchar(max)");
554 b.Property<
bool?>(
"CreateGitHubDeployments")
556 .HasColumnType(
"bit");
558 b.Property<
long>(
"InstanceId")
559 .HasColumnType(
"bigint");
561 b.Property<
bool?>(
"PostTestMergeComment")
563 .HasColumnType(
"bit");
565 b.Property<
bool?>(
"PushTestMergeCommits")
567 .HasColumnType(
"bit");
569 b.Property<
bool?>(
"ShowTestMergeCommitters")
571 .HasColumnType(
"bit");
573 b.Property<
bool?>(
"UpdateSubmodules")
575 .HasColumnType(
"bit");
579 b.HasIndex(
"InstanceId")
582 b.ToTable(
"RepositorySettings");
585 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
587 b.Property<
long>(
"Id")
588 .ValueGeneratedOnAdd()
589 .HasColumnType(
"bigint");
591 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"), 1L, 1);
593 b.Property<
long>(
"RevisionInformationId")
594 .HasColumnType(
"bigint");
596 b.Property<
long>(
"TestMergeId")
597 .HasColumnType(
"bigint");
601 b.HasIndex(
"RevisionInformationId");
603 b.HasIndex(
"TestMergeId");
605 b.ToTable(
"RevInfoTestMerges");
608 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
610 b.Property<
long>(
"Id")
611 .ValueGeneratedOnAdd()
612 .HasColumnType(
"bigint");
614 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"), 1L, 1);
616 b.Property<
string>(
"CommitSha")
619 .HasColumnType(
"nvarchar(40)");
621 b.Property<
long>(
"InstanceId")
622 .HasColumnType(
"bigint");
624 b.Property<
string>(
"OriginCommitSha")
627 .HasColumnType(
"nvarchar(40)");
629 b.Property<DateTimeOffset>(
"Timestamp")
630 .HasColumnType(
"datetimeoffset");
634 b.HasIndex(
"InstanceId",
"CommitSha")
637 b.ToTable(
"RevisionInformations");
640 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
642 b.Property<
long>(
"Id")
643 .ValueGeneratedOnAdd()
644 .HasColumnType(
"bigint");
646 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"), 1L, 1);
648 b.Property<
string>(
"Author")
650 .HasColumnType(
"nvarchar(max)");
652 b.Property<
string>(
"BodyAtMerge")
654 .HasColumnType(
"nvarchar(max)");
656 b.Property<
string>(
"Comment")
658 .HasColumnType(
"nvarchar(max)");
660 b.Property<DateTimeOffset>(
"MergedAt")
661 .HasColumnType(
"datetimeoffset");
663 b.Property<
long>(
"MergedById")
664 .HasColumnType(
"bigint");
666 b.Property<
int>(
"Number")
667 .HasColumnType(
"int");
669 b.Property<
long?>(
"PrimaryRevisionInformationId")
671 .HasColumnType(
"bigint");
673 b.Property<
string>(
"TargetCommitSha")
676 .HasColumnType(
"nvarchar(40)");
678 b.Property<
string>(
"TitleAtMerge")
680 .HasColumnType(
"nvarchar(max)");
682 b.Property<
string>(
"Url")
684 .HasColumnType(
"nvarchar(max)");
688 b.HasIndex(
"MergedById");
690 b.HasIndex(
"PrimaryRevisionInformationId")
693 b.ToTable(
"TestMerges");
696 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
698 b.Property<
long?>(
"Id")
699 .ValueGeneratedOnAdd()
700 .HasColumnType(
"bigint");
702 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"), 1L, 1);
704 b.Property<
string>(
"CanonicalName")
707 .HasColumnType(
"nvarchar(100)");
709 b.Property<DateTimeOffset?>(
"CreatedAt")
711 .HasColumnType(
"datetimeoffset");
713 b.Property<
long?>(
"CreatedById")
714 .HasColumnType(
"bigint");
716 b.Property<
bool?>(
"Enabled")
718 .HasColumnType(
"bit");
720 b.Property<
long?>(
"GroupId")
721 .HasColumnType(
"bigint");
723 b.Property<DateTimeOffset?>(
"LastPasswordUpdate")
724 .HasColumnType(
"datetimeoffset");
726 b.Property<
string>(
"Name")
729 .HasColumnType(
"nvarchar(100)");
731 b.Property<
string>(
"PasswordHash")
732 .HasColumnType(
"nvarchar(max)");
734 b.Property<
string>(
"SystemIdentifier")
736 .HasColumnType(
"nvarchar(100)");
740 b.HasIndex(
"CanonicalName")
743 b.HasIndex(
"CreatedById");
745 b.HasIndex(
"GroupId");
747 b.HasIndex(
"SystemIdentifier")
749 .HasFilter(
"[SystemIdentifier] IS NOT NULL");
754 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
756 b.Property<
long?>(
"Id")
757 .ValueGeneratedOnAdd()
758 .HasColumnType(
"bigint");
760 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"), 1L, 1);
762 b.Property<
string>(
"Name")
765 .HasColumnType(
"nvarchar(100)");
775 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
777 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
778 .WithMany(
"ChatSettings")
779 .HasForeignKey(
"InstanceId")
780 .OnDelete(DeleteBehavior.Cascade)
783 b.Navigation(
"Instance");
786 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
788 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
789 .WithMany(
"Channels")
790 .HasForeignKey(
"ChatSettingsId")
791 .OnDelete(DeleteBehavior.Cascade)
794 b.Navigation(
"ChatSettings");
797 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
799 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
801 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
802 .OnDelete(DeleteBehavior.Cascade)
805 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
806 .WithMany(
"CompileJobs")
807 .HasForeignKey(
"RevisionInformationId")
808 .OnDelete(DeleteBehavior.ClientNoAction)
813 b.Navigation(
"RevisionInformation");
816 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
818 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
819 .WithOne(
"DreamDaemonSettings")
820 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
821 .OnDelete(DeleteBehavior.Cascade)
824 b.Navigation(
"Instance");
827 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
829 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
830 .WithOne(
"DreamMakerSettings")
831 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
832 .OnDelete(DeleteBehavior.Cascade)
835 b.Navigation(
"Instance");
838 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
840 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
841 .WithMany(
"InstancePermissionSets")
842 .HasForeignKey(
"InstanceId")
843 .OnDelete(DeleteBehavior.Cascade)
846 b.HasOne(
"Tgstation.Server.Host.Models.PermissionSet",
"PermissionSet")
847 .WithMany(
"InstancePermissionSets")
848 .HasForeignKey(
"PermissionSetId")
849 .OnDelete(DeleteBehavior.Cascade)
852 b.Navigation(
"Instance");
854 b.Navigation(
"PermissionSet");
857 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
859 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
861 .HasForeignKey(
"CancelledById");
863 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
865 .HasForeignKey(
"InstanceId")
866 .OnDelete(DeleteBehavior.Cascade)
869 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
871 .HasForeignKey(
"StartedById")
872 .OnDelete(DeleteBehavior.Cascade)
875 b.Navigation(
"CancelledBy");
877 b.Navigation(
"Instance");
879 b.Navigation(
"StartedBy");
882 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
884 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
885 .WithMany(
"OAuthConnections")
886 .HasForeignKey(
"UserId")
887 .OnDelete(DeleteBehavior.Cascade);
889 b.Navigation(
"User");
892 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
894 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
895 .WithOne(
"PermissionSet")
896 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"GroupId")
897 .OnDelete(DeleteBehavior.Cascade);
899 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
900 .WithOne(
"PermissionSet")
901 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"UserId")
902 .OnDelete(DeleteBehavior.Cascade);
904 b.Navigation(
"Group");
906 b.Navigation(
"User");
909 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
911 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
913 .HasForeignKey(
"CompileJobId")
914 .OnDelete(DeleteBehavior.Cascade)
917 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"InitialCompileJob")
919 .HasForeignKey(
"InitialCompileJobId");
921 b.Navigation(
"CompileJob");
923 b.Navigation(
"InitialCompileJob");
926 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
928 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
929 .WithOne(
"RepositorySettings")
930 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
931 .OnDelete(DeleteBehavior.Cascade)
934 b.Navigation(
"Instance");
937 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
939 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
940 .WithMany(
"ActiveTestMerges")
941 .HasForeignKey(
"RevisionInformationId")
942 .OnDelete(DeleteBehavior.Cascade)
945 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
946 .WithMany(
"RevisonInformations")
947 .HasForeignKey(
"TestMergeId")
948 .OnDelete(DeleteBehavior.ClientNoAction)
951 b.Navigation(
"RevisionInformation");
953 b.Navigation(
"TestMerge");
956 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
958 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
959 .WithMany(
"RevisionInformations")
960 .HasForeignKey(
"InstanceId")
961 .OnDelete(DeleteBehavior.Cascade)
964 b.Navigation(
"Instance");
967 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
969 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
970 .WithMany(
"TestMerges")
971 .HasForeignKey(
"MergedById")
972 .OnDelete(DeleteBehavior.Restrict)
975 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
976 .WithOne(
"PrimaryTestMerge")
977 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
978 .OnDelete(DeleteBehavior.Cascade)
981 b.Navigation(
"MergedBy");
983 b.Navigation(
"PrimaryRevisionInformation");
986 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
988 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
989 .WithMany(
"CreatedUsers")
990 .HasForeignKey(
"CreatedById");
992 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
994 .HasForeignKey(
"GroupId");
996 b.Navigation(
"CreatedBy");
998 b.Navigation(
"Group");
1001 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
1003 b.Navigation(
"Channels");
1006 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
1008 b.Navigation(
"ChatSettings");
1010 b.Navigation(
"DreamDaemonSettings");
1012 b.Navigation(
"DreamMakerSettings");
1014 b.Navigation(
"InstancePermissionSets");
1016 b.Navigation(
"Jobs");
1018 b.Navigation(
"RepositorySettings");
1020 b.Navigation(
"RevisionInformations");
1023 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
1025 b.Navigation(
"InstancePermissionSets");
1028 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
1030 b.Navigation(
"ActiveTestMerges");
1032 b.Navigation(
"CompileJobs");
1034 b.Navigation(
"PrimaryTestMerge");
1037 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
1039 b.Navigation(
"RevisonInformations");
1042 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
1044 b.Navigation(
"CreatedUsers");
1046 b.Navigation(
"OAuthConnections");
1048 b.Navigation(
"PermissionSet");
1050 b.Navigation(
"TestMerges");
1053 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
1055 b.Navigation(
"PermissionSet")
1058 b.Navigation(
"Users");
1060#pragma warning restore 612, 618