17#pragma warning disable 612, 618
19 .HasAnnotation(
"ProductVersion",
"3.1.20")
20 .HasAnnotation(
"Relational:MaxIdentifierLength", 128)
21 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
23 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
25 b.Property<
long?>(
"Id")
26 .ValueGeneratedOnAdd()
27 .HasColumnType(
"bigint")
28 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
30 b.Property<
int>(
"ChannelLimit")
31 .HasColumnType(
"int");
33 b.Property<
string>(
"ConnectionString")
35 .HasColumnType(
"nvarchar(max)")
38 b.Property<
bool?>(
"Enabled")
39 .HasColumnType(
"bit");
41 b.Property<
long>(
"InstanceId")
42 .HasColumnType(
"bigint");
44 b.Property<
string>(
"Name")
46 .HasColumnType(
"nvarchar(100)")
49 b.Property<
int>(
"Provider")
50 .HasColumnType(
"int");
52 b.Property<
long>(
"ReconnectionInterval")
53 .HasColumnType(
"bigint");
57 b.HasIndex(
"InstanceId",
"Name")
60 b.ToTable(
"ChatBots");
63 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
65 b.Property<
long>(
"Id")
66 .ValueGeneratedOnAdd()
67 .HasColumnType(
"bigint")
68 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
70 b.Property<
long>(
"ChatSettingsId")
71 .HasColumnType(
"bigint");
73 b.Property<decimal?>(
"DiscordChannelId")
74 .HasColumnType(
"decimal(20,0)");
76 b.Property<
string>(
"IrcChannel")
77 .HasColumnType(
"nvarchar(100)")
80 b.Property<
bool?>(
"IsAdminChannel")
82 .HasColumnType(
"bit");
84 b.Property<
bool?>(
"IsUpdatesChannel")
86 .HasColumnType(
"bit");
88 b.Property<
bool?>(
"IsWatchdogChannel")
90 .HasColumnType(
"bit");
92 b.Property<
string>(
"Tag")
93 .HasColumnType(
"nvarchar(max)")
98 b.HasIndex(
"ChatSettingsId",
"DiscordChannelId")
100 .HasFilter(
"[DiscordChannelId] IS NOT NULL");
102 b.HasIndex(
"ChatSettingsId",
"IrcChannel")
104 .HasFilter(
"[IrcChannel] IS NOT NULL");
106 b.ToTable(
"ChatChannels");
109 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
111 b.Property<
long?>(
"Id")
112 .ValueGeneratedOnAdd()
113 .HasColumnType(
"bigint")
114 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
116 b.Property<
string>(
"ByondVersion")
118 .HasColumnType(
"nvarchar(max)");
120 b.Property<
int?>(
"DMApiMajorVersion")
121 .HasColumnType(
"int");
123 b.Property<
int?>(
"DMApiMinorVersion")
124 .HasColumnType(
"int");
126 b.Property<
int?>(
"DMApiPatchVersion")
127 .HasColumnType(
"int");
129 b.Property<Guid?>(
"DirectoryName")
131 .HasColumnType(
"uniqueidentifier");
133 b.Property<
string>(
"DmeName")
135 .HasColumnType(
"nvarchar(max)");
137 b.Property<
int?>(
"GitHubDeploymentId")
138 .HasColumnType(
"int");
140 b.Property<
long?>(
"GitHubRepoId")
141 .HasColumnType(
"bigint");
143 b.Property<
long>(
"JobId")
144 .HasColumnType(
"bigint");
146 b.Property<
int?>(
"MinimumSecurityLevel")
147 .HasColumnType(
"int");
149 b.Property<
string>(
"Output")
151 .HasColumnType(
"nvarchar(max)");
153 b.Property<
string>(
"RepositoryOrigin")
154 .HasColumnType(
"nvarchar(max)");
156 b.Property<
long>(
"RevisionInformationId")
157 .HasColumnType(
"bigint");
161 b.HasIndex(
"DirectoryName");
166 b.HasIndex(
"RevisionInformationId");
168 b.ToTable(
"CompileJobs");
171 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
173 b.Property<
long>(
"Id")
174 .ValueGeneratedOnAdd()
175 .HasColumnType(
"bigint")
176 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
178 b.Property<
string>(
"AdditionalParameters")
180 .HasColumnType(
"nvarchar(max)")
181 .HasMaxLength(10000);
183 b.Property<
bool?>(
"AllowWebClient")
185 .HasColumnType(
"bit");
187 b.Property<
bool?>(
"AutoStart")
189 .HasColumnType(
"bit");
191 b.Property<
bool?>(
"DumpOnHeartbeatRestart")
193 .HasColumnType(
"bit");
195 b.Property<
long>(
"HeartbeatSeconds")
196 .HasColumnType(
"bigint");
198 b.Property<
long>(
"InstanceId")
199 .HasColumnType(
"bigint");
201 b.Property<
int>(
"Port")
202 .HasColumnType(
"int");
204 b.Property<
int>(
"SecurityLevel")
205 .HasColumnType(
"int");
207 b.Property<
long>(
"StartupTimeout")
208 .HasColumnType(
"bigint");
210 b.Property<
long>(
"TopicRequestTimeout")
211 .HasColumnType(
"bigint");
213 b.Property<
int>(
"Visibility")
214 .HasColumnType(
"int");
218 b.HasIndex(
"InstanceId")
221 b.ToTable(
"DreamDaemonSettings");
224 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
226 b.Property<
long>(
"Id")
227 .ValueGeneratedOnAdd()
228 .HasColumnType(
"bigint")
229 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
231 b.Property<
int>(
"ApiValidationPort")
232 .HasColumnType(
"int");
234 b.Property<
int>(
"ApiValidationSecurityLevel")
235 .HasColumnType(
"int");
237 b.Property<
long>(
"InstanceId")
238 .HasColumnType(
"bigint");
240 b.Property<
string>(
"ProjectName")
241 .HasColumnType(
"nvarchar(max)")
242 .HasMaxLength(10000);
244 b.Property<
bool?>(
"RequireDMApiValidation")
246 .HasColumnType(
"bit");
248 b.Property<TimeSpan?>(
"Timeout")
250 .HasColumnType(
"time");
254 b.HasIndex(
"InstanceId")
257 b.ToTable(
"DreamMakerSettings");
260 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
262 b.Property<
long?>(
"Id")
263 .ValueGeneratedOnAdd()
264 .HasColumnType(
"bigint")
265 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
267 b.Property<
long>(
"AutoUpdateInterval")
268 .HasColumnType(
"bigint");
270 b.Property<
int>(
"ChatBotLimit")
271 .HasColumnType(
"int");
273 b.Property<
int>(
"ConfigurationType")
274 .HasColumnType(
"int");
276 b.Property<
string>(
"Name")
278 .HasColumnType(
"nvarchar(100)")
281 b.Property<
bool?>(
"Online")
283 .HasColumnType(
"bit");
285 b.Property<
string>(
"Path")
287 .HasColumnType(
"nvarchar(450)");
289 b.Property<
string>(
"SwarmIdentifer")
290 .HasColumnType(
"nvarchar(450)");
294 b.HasIndex(
"Path",
"SwarmIdentifer")
296 .HasFilter(
"[SwarmIdentifer] IS NOT NULL");
298 b.ToTable(
"Instances");
301 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
303 b.Property<
long>(
"Id")
304 .ValueGeneratedOnAdd()
305 .HasColumnType(
"bigint")
306 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
308 b.Property<decimal>(
"ByondRights")
309 .HasColumnType(
"decimal(20,0)");
311 b.Property<decimal>(
"ChatBotRights")
312 .HasColumnType(
"decimal(20,0)");
314 b.Property<decimal>(
"ConfigurationRights")
315 .HasColumnType(
"decimal(20,0)");
317 b.Property<decimal>(
"DreamDaemonRights")
318 .HasColumnType(
"decimal(20,0)");
320 b.Property<decimal>(
"DreamMakerRights")
321 .HasColumnType(
"decimal(20,0)");
323 b.Property<
long>(
"InstanceId")
324 .HasColumnType(
"bigint");
326 b.Property<decimal>(
"InstancePermissionSetRights")
327 .HasColumnType(
"decimal(20,0)");
329 b.Property<
long>(
"PermissionSetId")
330 .HasColumnType(
"bigint");
332 b.Property<decimal>(
"RepositoryRights")
333 .HasColumnType(
"decimal(20,0)");
337 b.HasIndex(
"InstanceId");
339 b.HasIndex(
"PermissionSetId",
"InstanceId")
342 b.ToTable(
"InstancePermissionSets");
345 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
347 b.Property<
long?>(
"Id")
348 .ValueGeneratedOnAdd()
349 .HasColumnType(
"bigint")
350 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
352 b.Property<decimal?>(
"CancelRight")
353 .HasColumnType(
"decimal(20,0)");
355 b.Property<decimal?>(
"CancelRightsType")
356 .HasColumnType(
"decimal(20,0)");
358 b.Property<
bool?>(
"Cancelled")
360 .HasColumnType(
"bit");
362 b.Property<
long?>(
"CancelledById")
363 .HasColumnType(
"bigint");
365 b.Property<
string>(
"Description")
367 .HasColumnType(
"nvarchar(max)");
369 b.Property<
long?>(
"ErrorCode")
370 .HasColumnType(
"bigint");
372 b.Property<
string>(
"ExceptionDetails")
373 .HasColumnType(
"nvarchar(max)");
375 b.Property<
long>(
"InstanceId")
376 .HasColumnType(
"bigint");
378 b.Property<DateTimeOffset?>(
"StartedAt")
380 .HasColumnType(
"datetimeoffset");
382 b.Property<
long>(
"StartedById")
383 .HasColumnType(
"bigint");
385 b.Property<DateTimeOffset?>(
"StoppedAt")
386 .HasColumnType(
"datetimeoffset");
390 b.HasIndex(
"CancelledById");
392 b.HasIndex(
"InstanceId");
394 b.HasIndex(
"StartedById");
399 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
401 b.Property<
long>(
"Id")
402 .ValueGeneratedOnAdd()
403 .HasColumnType(
"bigint")
404 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
406 b.Property<
string>(
"ExternalUserId")
408 .HasColumnType(
"nvarchar(100)")
411 b.Property<
int>(
"Provider")
412 .HasColumnType(
"int");
414 b.Property<
long?>(
"UserId")
415 .HasColumnType(
"bigint");
419 b.HasIndex(
"UserId");
421 b.HasIndex(
"Provider",
"ExternalUserId")
424 b.ToTable(
"OAuthConnections");
427 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
429 b.Property<
long?>(
"Id")
430 .ValueGeneratedOnAdd()
431 .HasColumnType(
"bigint")
432 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
434 b.Property<decimal>(
"AdministrationRights")
435 .HasColumnType(
"decimal(20,0)");
437 b.Property<
long?>(
"GroupId")
438 .HasColumnType(
"bigint");
440 b.Property<decimal>(
"InstanceManagerRights")
441 .HasColumnType(
"decimal(20,0)");
443 b.Property<
long?>(
"UserId")
444 .HasColumnType(
"bigint");
448 b.HasIndex(
"GroupId")
450 .HasFilter(
"[GroupId] IS NOT NULL");
454 .HasFilter(
"[UserId] IS NOT NULL");
456 b.ToTable(
"PermissionSets");
459 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
461 b.Property<
long>(
"Id")
462 .ValueGeneratedOnAdd()
463 .HasColumnType(
"bigint")
464 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
466 b.Property<
string>(
"AccessIdentifier")
468 .HasColumnType(
"nvarchar(max)");
470 b.Property<
long>(
"CompileJobId")
471 .HasColumnType(
"bigint");
473 b.Property<
int>(
"LaunchSecurityLevel")
474 .HasColumnType(
"int");
476 b.Property<
int>(
"LaunchVisibility")
477 .HasColumnType(
"int");
479 b.Property<
int>(
"Port")
480 .HasColumnType(
"int");
482 b.Property<
int>(
"ProcessId")
483 .HasColumnType(
"int");
485 b.Property<
int>(
"RebootState")
486 .HasColumnType(
"int");
490 b.HasIndex(
"CompileJobId");
492 b.ToTable(
"ReattachInformations");
495 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
497 b.Property<
long>(
"Id")
498 .ValueGeneratedOnAdd()
499 .HasColumnType(
"bigint")
500 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
502 b.Property<
string>(
"AccessToken")
503 .HasColumnType(
"nvarchar(max)")
504 .HasMaxLength(10000);
506 b.Property<
string>(
"AccessUser")
507 .HasColumnType(
"nvarchar(max)")
508 .HasMaxLength(10000);
510 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
512 .HasColumnType(
"bit");
514 b.Property<
bool?>(
"AutoUpdatesSynchronize")
516 .HasColumnType(
"bit");
518 b.Property<
string>(
"CommitterEmail")
520 .HasColumnType(
"nvarchar(max)")
521 .HasMaxLength(10000);
523 b.Property<
string>(
"CommitterName")
525 .HasColumnType(
"nvarchar(max)")
526 .HasMaxLength(10000);
528 b.Property<
bool?>(
"CreateGitHubDeployments")
530 .HasColumnType(
"bit");
532 b.Property<
long>(
"InstanceId")
533 .HasColumnType(
"bigint");
535 b.Property<
bool?>(
"PostTestMergeComment")
537 .HasColumnType(
"bit");
539 b.Property<
bool?>(
"PushTestMergeCommits")
541 .HasColumnType(
"bit");
543 b.Property<
bool?>(
"ShowTestMergeCommitters")
545 .HasColumnType(
"bit");
547 b.Property<
bool?>(
"UpdateSubmodules")
549 .HasColumnType(
"bit");
553 b.HasIndex(
"InstanceId")
556 b.ToTable(
"RepositorySettings");
559 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
561 b.Property<
long>(
"Id")
562 .ValueGeneratedOnAdd()
563 .HasColumnType(
"bigint")
564 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
566 b.Property<
long>(
"RevisionInformationId")
567 .HasColumnType(
"bigint");
569 b.Property<
long>(
"TestMergeId")
570 .HasColumnType(
"bigint");
574 b.HasIndex(
"RevisionInformationId");
576 b.HasIndex(
"TestMergeId");
578 b.ToTable(
"RevInfoTestMerges");
581 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
583 b.Property<
long>(
"Id")
584 .ValueGeneratedOnAdd()
585 .HasColumnType(
"bigint")
586 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
588 b.Property<
string>(
"CommitSha")
590 .HasColumnType(
"nvarchar(40)")
593 b.Property<
long>(
"InstanceId")
594 .HasColumnType(
"bigint");
596 b.Property<
string>(
"OriginCommitSha")
598 .HasColumnType(
"nvarchar(40)")
601 b.Property<DateTimeOffset>(
"Timestamp")
602 .HasColumnType(
"datetimeoffset");
606 b.HasIndex(
"InstanceId",
"CommitSha")
609 b.ToTable(
"RevisionInformations");
612 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
614 b.Property<
long>(
"Id")
615 .ValueGeneratedOnAdd()
616 .HasColumnType(
"bigint")
617 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
619 b.Property<
string>(
"Author")
621 .HasColumnType(
"nvarchar(max)");
623 b.Property<
string>(
"BodyAtMerge")
625 .HasColumnType(
"nvarchar(max)");
627 b.Property<
string>(
"Comment")
628 .HasColumnType(
"nvarchar(max)")
629 .HasMaxLength(10000);
631 b.Property<DateTimeOffset>(
"MergedAt")
632 .HasColumnType(
"datetimeoffset");
634 b.Property<
long>(
"MergedById")
635 .HasColumnType(
"bigint");
637 b.Property<
int>(
"Number")
638 .HasColumnType(
"int");
640 b.Property<
long?>(
"PrimaryRevisionInformationId")
642 .HasColumnType(
"bigint");
644 b.Property<
string>(
"TargetCommitSha")
646 .HasColumnType(
"nvarchar(40)")
649 b.Property<
string>(
"TitleAtMerge")
651 .HasColumnType(
"nvarchar(max)");
653 b.Property<
string>(
"Url")
655 .HasColumnType(
"nvarchar(max)");
659 b.HasIndex(
"MergedById");
661 b.HasIndex(
"PrimaryRevisionInformationId")
664 b.ToTable(
"TestMerges");
667 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
669 b.Property<
long?>(
"Id")
670 .ValueGeneratedOnAdd()
671 .HasColumnType(
"bigint")
672 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
674 b.Property<
string>(
"CanonicalName")
676 .HasColumnType(
"nvarchar(100)")
679 b.Property<DateTimeOffset?>(
"CreatedAt")
681 .HasColumnType(
"datetimeoffset");
683 b.Property<
long?>(
"CreatedById")
684 .HasColumnType(
"bigint");
686 b.Property<
bool?>(
"Enabled")
688 .HasColumnType(
"bit");
690 b.Property<
long?>(
"GroupId")
691 .HasColumnType(
"bigint");
693 b.Property<DateTimeOffset?>(
"LastPasswordUpdate")
694 .HasColumnType(
"datetimeoffset");
696 b.Property<
string>(
"Name")
698 .HasColumnType(
"nvarchar(100)")
701 b.Property<
string>(
"PasswordHash")
702 .HasColumnType(
"nvarchar(max)");
704 b.Property<
string>(
"SystemIdentifier")
705 .HasColumnType(
"nvarchar(100)")
710 b.HasIndex(
"CanonicalName")
713 b.HasIndex(
"CreatedById");
715 b.HasIndex(
"GroupId");
717 b.HasIndex(
"SystemIdentifier")
719 .HasFilter(
"[SystemIdentifier] IS NOT NULL");
724 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
726 b.Property<
long?>(
"Id")
727 .ValueGeneratedOnAdd()
728 .HasColumnType(
"bigint")
729 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
731 b.Property<
string>(
"Name")
733 .HasColumnType(
"nvarchar(100)")
744 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
746 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
747 .WithMany(
"ChatSettings")
748 .HasForeignKey(
"InstanceId")
749 .OnDelete(DeleteBehavior.Cascade)
753 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
755 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
756 .WithMany(
"Channels")
757 .HasForeignKey(
"ChatSettingsId")
758 .OnDelete(DeleteBehavior.Cascade)
762 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
764 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
766 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
767 .OnDelete(DeleteBehavior.Cascade)
770 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
771 .WithMany(
"CompileJobs")
772 .HasForeignKey(
"RevisionInformationId")
773 .OnDelete(DeleteBehavior.ClientNoAction)
777 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
779 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
780 .WithOne(
"DreamDaemonSettings")
781 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
782 .OnDelete(DeleteBehavior.Cascade)
786 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
788 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
789 .WithOne(
"DreamMakerSettings")
790 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
791 .OnDelete(DeleteBehavior.Cascade)
795 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
797 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
798 .WithMany(
"InstancePermissionSets")
799 .HasForeignKey(
"InstanceId")
800 .OnDelete(DeleteBehavior.Cascade)
803 b.HasOne(
"Tgstation.Server.Host.Models.PermissionSet",
"PermissionSet")
804 .WithMany(
"InstancePermissionSets")
805 .HasForeignKey(
"PermissionSetId")
806 .OnDelete(DeleteBehavior.Cascade)
810 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
812 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
814 .HasForeignKey(
"CancelledById");
816 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
818 .HasForeignKey(
"InstanceId")
819 .OnDelete(DeleteBehavior.Cascade)
822 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
824 .HasForeignKey(
"StartedById")
825 .OnDelete(DeleteBehavior.Cascade)
829 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
831 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
832 .WithMany(
"OAuthConnections")
833 .HasForeignKey(
"UserId")
834 .OnDelete(DeleteBehavior.Cascade);
837 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
839 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
840 .WithOne(
"PermissionSet")
841 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"GroupId")
842 .OnDelete(DeleteBehavior.Cascade);
844 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
845 .WithOne(
"PermissionSet")
846 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"UserId")
847 .OnDelete(DeleteBehavior.Cascade);
850 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
852 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
854 .HasForeignKey(
"CompileJobId")
855 .OnDelete(DeleteBehavior.Cascade)
859 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
861 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
862 .WithOne(
"RepositorySettings")
863 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
864 .OnDelete(DeleteBehavior.Cascade)
868 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
870 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
871 .WithMany(
"ActiveTestMerges")
872 .HasForeignKey(
"RevisionInformationId")
873 .OnDelete(DeleteBehavior.Cascade)
876 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
877 .WithMany(
"RevisonInformations")
878 .HasForeignKey(
"TestMergeId")
879 .OnDelete(DeleteBehavior.ClientNoAction)
883 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
885 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
886 .WithMany(
"RevisionInformations")
887 .HasForeignKey(
"InstanceId")
888 .OnDelete(DeleteBehavior.Cascade)
892 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
894 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
895 .WithMany(
"TestMerges")
896 .HasForeignKey(
"MergedById")
897 .OnDelete(DeleteBehavior.Restrict)
900 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
901 .WithOne(
"PrimaryTestMerge")
902 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
903 .OnDelete(DeleteBehavior.Cascade)
907 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
909 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
910 .WithMany(
"CreatedUsers")
911 .HasForeignKey(
"CreatedById");
913 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
915 .HasForeignKey(
"GroupId");
917#pragma warning restore 612, 618