18#pragma warning disable 612, 618
20 .HasAnnotation(
"ProductVersion",
"3.1.20")
21 .HasAnnotation(
"Relational:MaxIdentifierLength", 128)
22 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
24 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
26 b.Property<
long?>(
"Id")
27 .ValueGeneratedOnAdd()
28 .HasColumnType(
"bigint")
29 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
31 b.Property<
int>(
"ChannelLimit")
32 .HasColumnType(
"int");
34 b.Property<
string>(
"ConnectionString")
36 .HasColumnType(
"nvarchar(max)")
39 b.Property<
bool?>(
"Enabled")
40 .HasColumnType(
"bit");
42 b.Property<
long>(
"InstanceId")
43 .HasColumnType(
"bigint");
45 b.Property<
string>(
"Name")
47 .HasColumnType(
"nvarchar(100)")
50 b.Property<
int>(
"Provider")
51 .HasColumnType(
"int");
53 b.Property<
long>(
"ReconnectionInterval")
54 .HasColumnType(
"bigint");
58 b.HasIndex(
"InstanceId",
"Name")
61 b.ToTable(
"ChatBots");
64 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
66 b.Property<
long>(
"Id")
67 .ValueGeneratedOnAdd()
68 .HasColumnType(
"bigint")
69 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
71 b.Property<
long>(
"ChatSettingsId")
72 .HasColumnType(
"bigint");
74 b.Property<decimal?>(
"DiscordChannelId")
75 .HasColumnType(
"decimal(20,0)");
77 b.Property<
string>(
"IrcChannel")
78 .HasColumnType(
"nvarchar(100)")
81 b.Property<
bool?>(
"IsAdminChannel")
83 .HasColumnType(
"bit");
85 b.Property<
bool?>(
"IsUpdatesChannel")
87 .HasColumnType(
"bit");
89 b.Property<
bool?>(
"IsWatchdogChannel")
91 .HasColumnType(
"bit");
93 b.Property<
string>(
"Tag")
94 .HasColumnType(
"nvarchar(max)")
99 b.HasIndex(
"ChatSettingsId",
"DiscordChannelId")
101 .HasFilter(
"[DiscordChannelId] IS NOT NULL");
103 b.HasIndex(
"ChatSettingsId",
"IrcChannel")
105 .HasFilter(
"[IrcChannel] IS NOT NULL");
107 b.ToTable(
"ChatChannels");
110 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
112 b.Property<
long?>(
"Id")
113 .ValueGeneratedOnAdd()
114 .HasColumnType(
"bigint")
115 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
117 b.Property<
string>(
"ByondVersion")
119 .HasColumnType(
"nvarchar(max)");
121 b.Property<
int?>(
"DMApiMajorVersion")
122 .HasColumnType(
"int");
124 b.Property<
int?>(
"DMApiMinorVersion")
125 .HasColumnType(
"int");
127 b.Property<
int?>(
"DMApiPatchVersion")
128 .HasColumnType(
"int");
130 b.Property<Guid?>(
"DirectoryName")
132 .HasColumnType(
"uniqueidentifier");
134 b.Property<
string>(
"DmeName")
136 .HasColumnType(
"nvarchar(max)");
138 b.Property<
int?>(
"GitHubDeploymentId")
139 .HasColumnType(
"int");
141 b.Property<
long?>(
"GitHubRepoId")
142 .HasColumnType(
"bigint");
144 b.Property<
long>(
"JobId")
145 .HasColumnType(
"bigint");
147 b.Property<
int?>(
"MinimumSecurityLevel")
148 .HasColumnType(
"int");
150 b.Property<
string>(
"Output")
152 .HasColumnType(
"nvarchar(max)");
154 b.Property<
string>(
"RepositoryOrigin")
155 .HasColumnType(
"nvarchar(max)");
157 b.Property<
long>(
"RevisionInformationId")
158 .HasColumnType(
"bigint");
162 b.HasIndex(
"DirectoryName");
167 b.HasIndex(
"RevisionInformationId");
169 b.ToTable(
"CompileJobs");
172 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
174 b.Property<
long>(
"Id")
175 .ValueGeneratedOnAdd()
176 .HasColumnType(
"bigint")
177 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
179 b.Property<
string>(
"AdditionalParameters")
181 .HasColumnType(
"nvarchar(max)")
182 .HasMaxLength(10000);
184 b.Property<
bool?>(
"AllowWebClient")
186 .HasColumnType(
"bit");
188 b.Property<
bool?>(
"AutoStart")
190 .HasColumnType(
"bit");
192 b.Property<
bool?>(
"DumpOnHeartbeatRestart")
194 .HasColumnType(
"bit");
196 b.Property<
long>(
"HeartbeatSeconds")
197 .HasColumnType(
"bigint");
199 b.Property<
long>(
"InstanceId")
200 .HasColumnType(
"bigint");
202 b.Property<
int>(
"Port")
203 .HasColumnType(
"int");
205 b.Property<
int>(
"SecurityLevel")
206 .HasColumnType(
"int");
208 b.Property<
bool?>(
"StartProfiler")
210 .HasColumnType(
"bit");
212 b.Property<
long>(
"StartupTimeout")
213 .HasColumnType(
"bigint");
215 b.Property<
long>(
"TopicRequestTimeout")
216 .HasColumnType(
"bigint");
218 b.Property<
int>(
"Visibility")
219 .HasColumnType(
"int");
223 b.HasIndex(
"InstanceId")
226 b.ToTable(
"DreamDaemonSettings");
229 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
231 b.Property<
long>(
"Id")
232 .ValueGeneratedOnAdd()
233 .HasColumnType(
"bigint")
234 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
236 b.Property<
int>(
"ApiValidationPort")
237 .HasColumnType(
"int");
239 b.Property<
int>(
"ApiValidationSecurityLevel")
240 .HasColumnType(
"int");
242 b.Property<
long>(
"InstanceId")
243 .HasColumnType(
"bigint");
245 b.Property<
string>(
"ProjectName")
246 .HasColumnType(
"nvarchar(max)")
247 .HasMaxLength(10000);
249 b.Property<
bool?>(
"RequireDMApiValidation")
251 .HasColumnType(
"bit");
253 b.Property<TimeSpan?>(
"Timeout")
255 .HasColumnType(
"time");
259 b.HasIndex(
"InstanceId")
262 b.ToTable(
"DreamMakerSettings");
265 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
267 b.Property<
long?>(
"Id")
268 .ValueGeneratedOnAdd()
269 .HasColumnType(
"bigint")
270 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
272 b.Property<
long>(
"AutoUpdateInterval")
273 .HasColumnType(
"bigint");
275 b.Property<
int>(
"ChatBotLimit")
276 .HasColumnType(
"int");
278 b.Property<
int>(
"ConfigurationType")
279 .HasColumnType(
"int");
281 b.Property<
string>(
"Name")
283 .HasColumnType(
"nvarchar(100)")
286 b.Property<
bool?>(
"Online")
288 .HasColumnType(
"bit");
290 b.Property<
string>(
"Path")
292 .HasColumnType(
"nvarchar(450)");
294 b.Property<
string>(
"SwarmIdentifer")
295 .HasColumnType(
"nvarchar(450)");
299 b.HasIndex(
"Path",
"SwarmIdentifer")
301 .HasFilter(
"[SwarmIdentifer] IS NOT NULL");
303 b.ToTable(
"Instances");
306 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
308 b.Property<
long>(
"Id")
309 .ValueGeneratedOnAdd()
310 .HasColumnType(
"bigint")
311 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
313 b.Property<decimal>(
"ByondRights")
314 .HasColumnType(
"decimal(20,0)");
316 b.Property<decimal>(
"ChatBotRights")
317 .HasColumnType(
"decimal(20,0)");
319 b.Property<decimal>(
"ConfigurationRights")
320 .HasColumnType(
"decimal(20,0)");
322 b.Property<decimal>(
"DreamDaemonRights")
323 .HasColumnType(
"decimal(20,0)");
325 b.Property<decimal>(
"DreamMakerRights")
326 .HasColumnType(
"decimal(20,0)");
328 b.Property<
long>(
"InstanceId")
329 .HasColumnType(
"bigint");
331 b.Property<decimal>(
"InstancePermissionSetRights")
332 .HasColumnType(
"decimal(20,0)");
334 b.Property<
long>(
"PermissionSetId")
335 .HasColumnType(
"bigint");
337 b.Property<decimal>(
"RepositoryRights")
338 .HasColumnType(
"decimal(20,0)");
342 b.HasIndex(
"InstanceId");
344 b.HasIndex(
"PermissionSetId",
"InstanceId")
347 b.ToTable(
"InstancePermissionSets");
350 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
352 b.Property<
long?>(
"Id")
353 .ValueGeneratedOnAdd()
354 .HasColumnType(
"bigint")
355 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
357 b.Property<decimal?>(
"CancelRight")
358 .HasColumnType(
"decimal(20,0)");
360 b.Property<decimal?>(
"CancelRightsType")
361 .HasColumnType(
"decimal(20,0)");
363 b.Property<
bool?>(
"Cancelled")
365 .HasColumnType(
"bit");
367 b.Property<
long?>(
"CancelledById")
368 .HasColumnType(
"bigint");
370 b.Property<
string>(
"Description")
372 .HasColumnType(
"nvarchar(max)");
374 b.Property<
long?>(
"ErrorCode")
375 .HasColumnType(
"bigint");
377 b.Property<
string>(
"ExceptionDetails")
378 .HasColumnType(
"nvarchar(max)");
380 b.Property<
long>(
"InstanceId")
381 .HasColumnType(
"bigint");
383 b.Property<DateTimeOffset?>(
"StartedAt")
385 .HasColumnType(
"datetimeoffset");
387 b.Property<
long>(
"StartedById")
388 .HasColumnType(
"bigint");
390 b.Property<DateTimeOffset?>(
"StoppedAt")
391 .HasColumnType(
"datetimeoffset");
395 b.HasIndex(
"CancelledById");
397 b.HasIndex(
"InstanceId");
399 b.HasIndex(
"StartedById");
404 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
406 b.Property<
long>(
"Id")
407 .ValueGeneratedOnAdd()
408 .HasColumnType(
"bigint")
409 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
411 b.Property<
string>(
"ExternalUserId")
413 .HasColumnType(
"nvarchar(100)")
416 b.Property<
int>(
"Provider")
417 .HasColumnType(
"int");
419 b.Property<
long?>(
"UserId")
420 .HasColumnType(
"bigint");
424 b.HasIndex(
"UserId");
426 b.HasIndex(
"Provider",
"ExternalUserId")
429 b.ToTable(
"OAuthConnections");
432 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
434 b.Property<
long?>(
"Id")
435 .ValueGeneratedOnAdd()
436 .HasColumnType(
"bigint")
437 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
439 b.Property<decimal>(
"AdministrationRights")
440 .HasColumnType(
"decimal(20,0)");
442 b.Property<
long?>(
"GroupId")
443 .HasColumnType(
"bigint");
445 b.Property<decimal>(
"InstanceManagerRights")
446 .HasColumnType(
"decimal(20,0)");
448 b.Property<
long?>(
"UserId")
449 .HasColumnType(
"bigint");
453 b.HasIndex(
"GroupId")
455 .HasFilter(
"[GroupId] IS NOT NULL");
459 .HasFilter(
"[UserId] IS NOT NULL");
461 b.ToTable(
"PermissionSets");
464 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
466 b.Property<
long>(
"Id")
467 .ValueGeneratedOnAdd()
468 .HasColumnType(
"bigint")
469 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
471 b.Property<
string>(
"AccessIdentifier")
473 .HasColumnType(
"nvarchar(max)");
475 b.Property<
long>(
"CompileJobId")
476 .HasColumnType(
"bigint");
478 b.Property<
int>(
"LaunchSecurityLevel")
479 .HasColumnType(
"int");
481 b.Property<
int>(
"LaunchVisibility")
482 .HasColumnType(
"int");
484 b.Property<
int>(
"Port")
485 .HasColumnType(
"int");
487 b.Property<
int>(
"ProcessId")
488 .HasColumnType(
"int");
490 b.Property<
int>(
"RebootState")
491 .HasColumnType(
"int");
495 b.HasIndex(
"CompileJobId");
497 b.ToTable(
"ReattachInformations");
500 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
502 b.Property<
long>(
"Id")
503 .ValueGeneratedOnAdd()
504 .HasColumnType(
"bigint")
505 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
507 b.Property<
string>(
"AccessToken")
508 .HasColumnType(
"nvarchar(max)")
509 .HasMaxLength(10000);
511 b.Property<
string>(
"AccessUser")
512 .HasColumnType(
"nvarchar(max)")
513 .HasMaxLength(10000);
515 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
517 .HasColumnType(
"bit");
519 b.Property<
bool?>(
"AutoUpdatesSynchronize")
521 .HasColumnType(
"bit");
523 b.Property<
string>(
"CommitterEmail")
525 .HasColumnType(
"nvarchar(max)")
526 .HasMaxLength(10000);
528 b.Property<
string>(
"CommitterName")
530 .HasColumnType(
"nvarchar(max)")
531 .HasMaxLength(10000);
533 b.Property<
bool?>(
"CreateGitHubDeployments")
535 .HasColumnType(
"bit");
537 b.Property<
long>(
"InstanceId")
538 .HasColumnType(
"bigint");
540 b.Property<
bool?>(
"PostTestMergeComment")
542 .HasColumnType(
"bit");
544 b.Property<
bool?>(
"PushTestMergeCommits")
546 .HasColumnType(
"bit");
548 b.Property<
bool?>(
"ShowTestMergeCommitters")
550 .HasColumnType(
"bit");
552 b.Property<
bool?>(
"UpdateSubmodules")
554 .HasColumnType(
"bit");
558 b.HasIndex(
"InstanceId")
561 b.ToTable(
"RepositorySettings");
564 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
566 b.Property<
long>(
"Id")
567 .ValueGeneratedOnAdd()
568 .HasColumnType(
"bigint")
569 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
571 b.Property<
long>(
"RevisionInformationId")
572 .HasColumnType(
"bigint");
574 b.Property<
long>(
"TestMergeId")
575 .HasColumnType(
"bigint");
579 b.HasIndex(
"RevisionInformationId");
581 b.HasIndex(
"TestMergeId");
583 b.ToTable(
"RevInfoTestMerges");
586 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
588 b.Property<
long>(
"Id")
589 .ValueGeneratedOnAdd()
590 .HasColumnType(
"bigint")
591 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
593 b.Property<
string>(
"CommitSha")
595 .HasColumnType(
"nvarchar(40)")
598 b.Property<
long>(
"InstanceId")
599 .HasColumnType(
"bigint");
601 b.Property<
string>(
"OriginCommitSha")
603 .HasColumnType(
"nvarchar(40)")
606 b.Property<DateTimeOffset>(
"Timestamp")
607 .HasColumnType(
"datetimeoffset");
611 b.HasIndex(
"InstanceId",
"CommitSha")
614 b.ToTable(
"RevisionInformations");
617 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
619 b.Property<
long>(
"Id")
620 .ValueGeneratedOnAdd()
621 .HasColumnType(
"bigint")
622 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
624 b.Property<
string>(
"Author")
626 .HasColumnType(
"nvarchar(max)");
628 b.Property<
string>(
"BodyAtMerge")
630 .HasColumnType(
"nvarchar(max)");
632 b.Property<
string>(
"Comment")
633 .HasColumnType(
"nvarchar(max)")
634 .HasMaxLength(10000);
636 b.Property<DateTimeOffset>(
"MergedAt")
637 .HasColumnType(
"datetimeoffset");
639 b.Property<
long>(
"MergedById")
640 .HasColumnType(
"bigint");
642 b.Property<
int>(
"Number")
643 .HasColumnType(
"int");
645 b.Property<
long?>(
"PrimaryRevisionInformationId")
647 .HasColumnType(
"bigint");
649 b.Property<
string>(
"TargetCommitSha")
651 .HasColumnType(
"nvarchar(40)")
654 b.Property<
string>(
"TitleAtMerge")
656 .HasColumnType(
"nvarchar(max)");
658 b.Property<
string>(
"Url")
660 .HasColumnType(
"nvarchar(max)");
664 b.HasIndex(
"MergedById");
666 b.HasIndex(
"PrimaryRevisionInformationId")
669 b.ToTable(
"TestMerges");
672 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
674 b.Property<
long?>(
"Id")
675 .ValueGeneratedOnAdd()
676 .HasColumnType(
"bigint")
677 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
679 b.Property<
string>(
"CanonicalName")
681 .HasColumnType(
"nvarchar(100)")
684 b.Property<DateTimeOffset?>(
"CreatedAt")
686 .HasColumnType(
"datetimeoffset");
688 b.Property<
long?>(
"CreatedById")
689 .HasColumnType(
"bigint");
691 b.Property<
bool?>(
"Enabled")
693 .HasColumnType(
"bit");
695 b.Property<
long?>(
"GroupId")
696 .HasColumnType(
"bigint");
698 b.Property<DateTimeOffset?>(
"LastPasswordUpdate")
699 .HasColumnType(
"datetimeoffset");
701 b.Property<
string>(
"Name")
703 .HasColumnType(
"nvarchar(100)")
706 b.Property<
string>(
"PasswordHash")
707 .HasColumnType(
"nvarchar(max)");
709 b.Property<
string>(
"SystemIdentifier")
710 .HasColumnType(
"nvarchar(100)")
715 b.HasIndex(
"CanonicalName")
718 b.HasIndex(
"CreatedById");
720 b.HasIndex(
"GroupId");
722 b.HasIndex(
"SystemIdentifier")
724 .HasFilter(
"[SystemIdentifier] IS NOT NULL");
729 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
731 b.Property<
long?>(
"Id")
732 .ValueGeneratedOnAdd()
733 .HasColumnType(
"bigint")
734 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
736 b.Property<
string>(
"Name")
738 .HasColumnType(
"nvarchar(100)")
749 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
751 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
752 .WithMany(
"ChatSettings")
753 .HasForeignKey(
"InstanceId")
754 .OnDelete(DeleteBehavior.Cascade)
758 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
760 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
761 .WithMany(
"Channels")
762 .HasForeignKey(
"ChatSettingsId")
763 .OnDelete(DeleteBehavior.Cascade)
767 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
769 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
771 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
772 .OnDelete(DeleteBehavior.Cascade)
775 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
776 .WithMany(
"CompileJobs")
777 .HasForeignKey(
"RevisionInformationId")
778 .OnDelete(DeleteBehavior.ClientNoAction)
782 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
784 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
785 .WithOne(
"DreamDaemonSettings")
786 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
787 .OnDelete(DeleteBehavior.Cascade)
791 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
793 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
794 .WithOne(
"DreamMakerSettings")
795 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
796 .OnDelete(DeleteBehavior.Cascade)
800 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
802 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
803 .WithMany(
"InstancePermissionSets")
804 .HasForeignKey(
"InstanceId")
805 .OnDelete(DeleteBehavior.Cascade)
808 b.HasOne(
"Tgstation.Server.Host.Models.PermissionSet",
"PermissionSet")
809 .WithMany(
"InstancePermissionSets")
810 .HasForeignKey(
"PermissionSetId")
811 .OnDelete(DeleteBehavior.Cascade)
815 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
817 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
819 .HasForeignKey(
"CancelledById");
821 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
823 .HasForeignKey(
"InstanceId")
824 .OnDelete(DeleteBehavior.Cascade)
827 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
829 .HasForeignKey(
"StartedById")
830 .OnDelete(DeleteBehavior.Cascade)
834 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
836 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
837 .WithMany(
"OAuthConnections")
838 .HasForeignKey(
"UserId")
839 .OnDelete(DeleteBehavior.Cascade);
842 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
844 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
845 .WithOne(
"PermissionSet")
846 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"GroupId")
847 .OnDelete(DeleteBehavior.Cascade);
849 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
850 .WithOne(
"PermissionSet")
851 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"UserId")
852 .OnDelete(DeleteBehavior.Cascade);
855 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
857 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
859 .HasForeignKey(
"CompileJobId")
860 .OnDelete(DeleteBehavior.Cascade)
864 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
866 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
867 .WithOne(
"RepositorySettings")
868 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
869 .OnDelete(DeleteBehavior.Cascade)
873 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
875 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
876 .WithMany(
"ActiveTestMerges")
877 .HasForeignKey(
"RevisionInformationId")
878 .OnDelete(DeleteBehavior.Cascade)
881 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
882 .WithMany(
"RevisonInformations")
883 .HasForeignKey(
"TestMergeId")
884 .OnDelete(DeleteBehavior.ClientNoAction)
888 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
890 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
891 .WithMany(
"RevisionInformations")
892 .HasForeignKey(
"InstanceId")
893 .OnDelete(DeleteBehavior.Cascade)
897 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
899 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
900 .WithMany(
"TestMerges")
901 .HasForeignKey(
"MergedById")
902 .OnDelete(DeleteBehavior.Restrict)
905 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
906 .WithOne(
"PrimaryTestMerge")
907 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
908 .OnDelete(DeleteBehavior.Cascade)
912 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
914 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
915 .WithMany(
"CreatedUsers")
916 .HasForeignKey(
"CreatedById");
918 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
920 .HasForeignKey(
"GroupId");
922#pragma warning restore 612, 618