18#pragma warning disable 612, 618
20 .HasAnnotation(
"ProductVersion",
"3.1.18")
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<
long>(
"HeartbeatSeconds")
193 .HasColumnType(
"bigint");
195 b.Property<
long>(
"InstanceId")
196 .HasColumnType(
"bigint");
198 b.Property<
int>(
"Port")
199 .HasColumnType(
"int");
201 b.Property<
int>(
"SecurityLevel")
202 .HasColumnType(
"int");
204 b.Property<
long>(
"StartupTimeout")
205 .HasColumnType(
"bigint");
207 b.Property<
long>(
"TopicRequestTimeout")
208 .HasColumnType(
"bigint");
210 b.Property<
int>(
"Visibility")
211 .HasColumnType(
"int");
215 b.HasIndex(
"InstanceId")
218 b.ToTable(
"DreamDaemonSettings");
221 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
223 b.Property<
long>(
"Id")
224 .ValueGeneratedOnAdd()
225 .HasColumnType(
"bigint")
226 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
228 b.Property<
int>(
"ApiValidationPort")
229 .HasColumnType(
"int");
231 b.Property<
int>(
"ApiValidationSecurityLevel")
232 .HasColumnType(
"int");
234 b.Property<
long>(
"InstanceId")
235 .HasColumnType(
"bigint");
237 b.Property<
string>(
"ProjectName")
238 .HasColumnType(
"nvarchar(max)")
239 .HasMaxLength(10000);
241 b.Property<
bool?>(
"RequireDMApiValidation")
243 .HasColumnType(
"bit");
245 b.Property<TimeSpan?>(
"Timeout")
247 .HasColumnType(
"time");
251 b.HasIndex(
"InstanceId")
254 b.ToTable(
"DreamMakerSettings");
257 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
259 b.Property<
long?>(
"Id")
260 .ValueGeneratedOnAdd()
261 .HasColumnType(
"bigint")
262 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
264 b.Property<
long>(
"AutoUpdateInterval")
265 .HasColumnType(
"bigint");
267 b.Property<
int>(
"ChatBotLimit")
268 .HasColumnType(
"int");
270 b.Property<
int>(
"ConfigurationType")
271 .HasColumnType(
"int");
273 b.Property<
string>(
"Name")
275 .HasColumnType(
"nvarchar(100)")
278 b.Property<
bool?>(
"Online")
280 .HasColumnType(
"bit");
282 b.Property<
string>(
"Path")
284 .HasColumnType(
"nvarchar(450)");
286 b.Property<
string>(
"SwarmIdentifer")
287 .HasColumnType(
"nvarchar(450)");
291 b.HasIndex(
"Path",
"SwarmIdentifer")
293 .HasFilter(
"[SwarmIdentifer] IS NOT NULL");
295 b.ToTable(
"Instances");
298 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
300 b.Property<
long>(
"Id")
301 .ValueGeneratedOnAdd()
302 .HasColumnType(
"bigint")
303 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
305 b.Property<decimal>(
"ByondRights")
306 .HasColumnType(
"decimal(20,0)");
308 b.Property<decimal>(
"ChatBotRights")
309 .HasColumnType(
"decimal(20,0)");
311 b.Property<decimal>(
"ConfigurationRights")
312 .HasColumnType(
"decimal(20,0)");
314 b.Property<decimal>(
"DreamDaemonRights")
315 .HasColumnType(
"decimal(20,0)");
317 b.Property<decimal>(
"DreamMakerRights")
318 .HasColumnType(
"decimal(20,0)");
320 b.Property<
long>(
"InstanceId")
321 .HasColumnType(
"bigint");
323 b.Property<decimal>(
"InstancePermissionSetRights")
324 .HasColumnType(
"decimal(20,0)");
326 b.Property<
long>(
"PermissionSetId")
327 .HasColumnType(
"bigint");
329 b.Property<decimal>(
"RepositoryRights")
330 .HasColumnType(
"decimal(20,0)");
334 b.HasIndex(
"InstanceId");
336 b.HasIndex(
"PermissionSetId",
"InstanceId")
339 b.ToTable(
"InstancePermissionSets");
342 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
344 b.Property<
long?>(
"Id")
345 .ValueGeneratedOnAdd()
346 .HasColumnType(
"bigint")
347 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
349 b.Property<decimal?>(
"CancelRight")
350 .HasColumnType(
"decimal(20,0)");
352 b.Property<decimal?>(
"CancelRightsType")
353 .HasColumnType(
"decimal(20,0)");
355 b.Property<
bool?>(
"Cancelled")
357 .HasColumnType(
"bit");
359 b.Property<
long?>(
"CancelledById")
360 .HasColumnType(
"bigint");
362 b.Property<
string>(
"Description")
364 .HasColumnType(
"nvarchar(max)");
366 b.Property<
long?>(
"ErrorCode")
367 .HasColumnType(
"bigint");
369 b.Property<
string>(
"ExceptionDetails")
370 .HasColumnType(
"nvarchar(max)");
372 b.Property<
long>(
"InstanceId")
373 .HasColumnType(
"bigint");
375 b.Property<DateTimeOffset?>(
"StartedAt")
377 .HasColumnType(
"datetimeoffset");
379 b.Property<
long>(
"StartedById")
380 .HasColumnType(
"bigint");
382 b.Property<DateTimeOffset?>(
"StoppedAt")
383 .HasColumnType(
"datetimeoffset");
387 b.HasIndex(
"CancelledById");
389 b.HasIndex(
"InstanceId");
391 b.HasIndex(
"StartedById");
396 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
398 b.Property<
long>(
"Id")
399 .ValueGeneratedOnAdd()
400 .HasColumnType(
"bigint")
401 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
403 b.Property<
string>(
"ExternalUserId")
405 .HasColumnType(
"nvarchar(100)")
408 b.Property<
int>(
"Provider")
409 .HasColumnType(
"int");
411 b.Property<
long?>(
"UserId")
412 .HasColumnType(
"bigint");
416 b.HasIndex(
"UserId");
418 b.HasIndex(
"Provider",
"ExternalUserId")
421 b.ToTable(
"OAuthConnections");
424 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
426 b.Property<
long?>(
"Id")
427 .ValueGeneratedOnAdd()
428 .HasColumnType(
"bigint")
429 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
431 b.Property<decimal>(
"AdministrationRights")
432 .HasColumnType(
"decimal(20,0)");
434 b.Property<
long?>(
"GroupId")
435 .HasColumnType(
"bigint");
437 b.Property<decimal>(
"InstanceManagerRights")
438 .HasColumnType(
"decimal(20,0)");
440 b.Property<
long?>(
"UserId")
441 .HasColumnType(
"bigint");
445 b.HasIndex(
"GroupId")
447 .HasFilter(
"[GroupId] IS NOT NULL");
451 .HasFilter(
"[UserId] IS NOT NULL");
453 b.ToTable(
"PermissionSets");
456 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
458 b.Property<
long>(
"Id")
459 .ValueGeneratedOnAdd()
460 .HasColumnType(
"bigint")
461 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
463 b.Property<
string>(
"AccessIdentifier")
465 .HasColumnType(
"nvarchar(max)");
467 b.Property<
long>(
"CompileJobId")
468 .HasColumnType(
"bigint");
470 b.Property<
int>(
"LaunchSecurityLevel")
471 .HasColumnType(
"int");
473 b.Property<
int>(
"LaunchVisibility")
474 .HasColumnType(
"int");
476 b.Property<
int>(
"Port")
477 .HasColumnType(
"int");
479 b.Property<
int>(
"ProcessId")
480 .HasColumnType(
"int");
482 b.Property<
int>(
"RebootState")
483 .HasColumnType(
"int");
487 b.HasIndex(
"CompileJobId");
489 b.ToTable(
"ReattachInformations");
492 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
494 b.Property<
long>(
"Id")
495 .ValueGeneratedOnAdd()
496 .HasColumnType(
"bigint")
497 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
499 b.Property<
string>(
"AccessToken")
500 .HasColumnType(
"nvarchar(max)")
501 .HasMaxLength(10000);
503 b.Property<
string>(
"AccessUser")
504 .HasColumnType(
"nvarchar(max)")
505 .HasMaxLength(10000);
507 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
509 .HasColumnType(
"bit");
511 b.Property<
bool?>(
"AutoUpdatesSynchronize")
513 .HasColumnType(
"bit");
515 b.Property<
string>(
"CommitterEmail")
517 .HasColumnType(
"nvarchar(max)")
518 .HasMaxLength(10000);
520 b.Property<
string>(
"CommitterName")
522 .HasColumnType(
"nvarchar(max)")
523 .HasMaxLength(10000);
525 b.Property<
bool?>(
"CreateGitHubDeployments")
527 .HasColumnType(
"bit");
529 b.Property<
long>(
"InstanceId")
530 .HasColumnType(
"bigint");
532 b.Property<
bool?>(
"PostTestMergeComment")
534 .HasColumnType(
"bit");
536 b.Property<
bool?>(
"PushTestMergeCommits")
538 .HasColumnType(
"bit");
540 b.Property<
bool?>(
"ShowTestMergeCommitters")
542 .HasColumnType(
"bit");
544 b.Property<
bool?>(
"UpdateSubmodules")
546 .HasColumnType(
"bit");
550 b.HasIndex(
"InstanceId")
553 b.ToTable(
"RepositorySettings");
556 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
558 b.Property<
long>(
"Id")
559 .ValueGeneratedOnAdd()
560 .HasColumnType(
"bigint")
561 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
563 b.Property<
long>(
"RevisionInformationId")
564 .HasColumnType(
"bigint");
566 b.Property<
long>(
"TestMergeId")
567 .HasColumnType(
"bigint");
571 b.HasIndex(
"RevisionInformationId");
573 b.HasIndex(
"TestMergeId");
575 b.ToTable(
"RevInfoTestMerges");
578 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
580 b.Property<
long>(
"Id")
581 .ValueGeneratedOnAdd()
582 .HasColumnType(
"bigint")
583 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
585 b.Property<
string>(
"CommitSha")
587 .HasColumnType(
"nvarchar(40)")
590 b.Property<
long>(
"InstanceId")
591 .HasColumnType(
"bigint");
593 b.Property<
string>(
"OriginCommitSha")
595 .HasColumnType(
"nvarchar(40)")
598 b.Property<DateTimeOffset>(
"Timestamp")
599 .HasColumnType(
"datetimeoffset");
603 b.HasIndex(
"InstanceId",
"CommitSha")
606 b.ToTable(
"RevisionInformations");
609 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
611 b.Property<
long>(
"Id")
612 .ValueGeneratedOnAdd()
613 .HasColumnType(
"bigint")
614 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
616 b.Property<
string>(
"Author")
618 .HasColumnType(
"nvarchar(max)");
620 b.Property<
string>(
"BodyAtMerge")
622 .HasColumnType(
"nvarchar(max)");
624 b.Property<
string>(
"Comment")
625 .HasColumnType(
"nvarchar(max)")
626 .HasMaxLength(10000);
628 b.Property<DateTimeOffset>(
"MergedAt")
629 .HasColumnType(
"datetimeoffset");
631 b.Property<
long>(
"MergedById")
632 .HasColumnType(
"bigint");
634 b.Property<
int>(
"Number")
635 .HasColumnType(
"int");
637 b.Property<
long?>(
"PrimaryRevisionInformationId")
639 .HasColumnType(
"bigint");
641 b.Property<
string>(
"TargetCommitSha")
643 .HasColumnType(
"nvarchar(40)")
646 b.Property<
string>(
"TitleAtMerge")
648 .HasColumnType(
"nvarchar(max)");
650 b.Property<
string>(
"Url")
652 .HasColumnType(
"nvarchar(max)");
656 b.HasIndex(
"MergedById");
658 b.HasIndex(
"PrimaryRevisionInformationId")
661 b.ToTable(
"TestMerges");
664 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
666 b.Property<
long?>(
"Id")
667 .ValueGeneratedOnAdd()
668 .HasColumnType(
"bigint")
669 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
671 b.Property<
string>(
"CanonicalName")
673 .HasColumnType(
"nvarchar(100)")
676 b.Property<DateTimeOffset?>(
"CreatedAt")
678 .HasColumnType(
"datetimeoffset");
680 b.Property<
long?>(
"CreatedById")
681 .HasColumnType(
"bigint");
683 b.Property<
bool?>(
"Enabled")
685 .HasColumnType(
"bit");
687 b.Property<
long?>(
"GroupId")
688 .HasColumnType(
"bigint");
690 b.Property<DateTimeOffset?>(
"LastPasswordUpdate")
691 .HasColumnType(
"datetimeoffset");
693 b.Property<
string>(
"Name")
695 .HasColumnType(
"nvarchar(100)")
698 b.Property<
string>(
"PasswordHash")
699 .HasColumnType(
"nvarchar(max)");
701 b.Property<
string>(
"SystemIdentifier")
702 .HasColumnType(
"nvarchar(100)")
707 b.HasIndex(
"CanonicalName")
710 b.HasIndex(
"CreatedById");
712 b.HasIndex(
"GroupId");
714 b.HasIndex(
"SystemIdentifier")
716 .HasFilter(
"[SystemIdentifier] IS NOT NULL");
721 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
723 b.Property<
long?>(
"Id")
724 .ValueGeneratedOnAdd()
725 .HasColumnType(
"bigint")
726 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
728 b.Property<
string>(
"Name")
730 .HasColumnType(
"nvarchar(100)")
741 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
743 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
744 .WithMany(
"ChatSettings")
745 .HasForeignKey(
"InstanceId")
746 .OnDelete(DeleteBehavior.Cascade)
750 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
752 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
753 .WithMany(
"Channels")
754 .HasForeignKey(
"ChatSettingsId")
755 .OnDelete(DeleteBehavior.Cascade)
759 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
761 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
763 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
764 .OnDelete(DeleteBehavior.Cascade)
767 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
768 .WithMany(
"CompileJobs")
769 .HasForeignKey(
"RevisionInformationId")
770 .OnDelete(DeleteBehavior.ClientNoAction)
774 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
776 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
777 .WithOne(
"DreamDaemonSettings")
778 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
779 .OnDelete(DeleteBehavior.Cascade)
783 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
785 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
786 .WithOne(
"DreamMakerSettings")
787 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
788 .OnDelete(DeleteBehavior.Cascade)
792 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
794 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
795 .WithMany(
"InstancePermissionSets")
796 .HasForeignKey(
"InstanceId")
797 .OnDelete(DeleteBehavior.Cascade)
800 b.HasOne(
"Tgstation.Server.Host.Models.PermissionSet",
"PermissionSet")
801 .WithMany(
"InstancePermissionSets")
802 .HasForeignKey(
"PermissionSetId")
803 .OnDelete(DeleteBehavior.Cascade)
807 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
809 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
811 .HasForeignKey(
"CancelledById");
813 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
815 .HasForeignKey(
"InstanceId")
816 .OnDelete(DeleteBehavior.Cascade)
819 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
821 .HasForeignKey(
"StartedById")
822 .OnDelete(DeleteBehavior.Cascade)
826 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
828 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
829 .WithMany(
"OAuthConnections")
830 .HasForeignKey(
"UserId")
831 .OnDelete(DeleteBehavior.Cascade);
834 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
836 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
837 .WithOne(
"PermissionSet")
838 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"GroupId")
839 .OnDelete(DeleteBehavior.Cascade);
841 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
842 .WithOne(
"PermissionSet")
843 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"UserId")
844 .OnDelete(DeleteBehavior.Cascade);
847 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
849 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
851 .HasForeignKey(
"CompileJobId")
852 .OnDelete(DeleteBehavior.Cascade)
856 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
858 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
859 .WithOne(
"RepositorySettings")
860 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
861 .OnDelete(DeleteBehavior.Cascade)
865 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
867 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
868 .WithMany(
"ActiveTestMerges")
869 .HasForeignKey(
"RevisionInformationId")
870 .OnDelete(DeleteBehavior.Cascade)
873 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
874 .WithMany(
"RevisonInformations")
875 .HasForeignKey(
"TestMergeId")
876 .OnDelete(DeleteBehavior.ClientNoAction)
880 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
882 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
883 .WithMany(
"RevisionInformations")
884 .HasForeignKey(
"InstanceId")
885 .OnDelete(DeleteBehavior.Cascade)
889 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
891 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
892 .WithMany(
"TestMerges")
893 .HasForeignKey(
"MergedById")
894 .OnDelete(DeleteBehavior.Restrict)
897 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
898 .WithOne(
"PrimaryTestMerge")
899 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
900 .OnDelete(DeleteBehavior.Cascade)
904 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
906 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
907 .WithMany(
"CreatedUsers")
908 .HasForeignKey(
"CreatedById");
910 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
912 .HasForeignKey(
"GroupId");
914#pragma warning restore 612, 618