17#pragma warning disable 612, 618
19 .HasAnnotation(
"ProductVersion",
"3.1.10")
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<
long>(
"HeartbeatSeconds")
192 .HasColumnType(
"bigint");
194 b.Property<
long>(
"InstanceId")
195 .HasColumnType(
"bigint");
197 b.Property<
int>(
"Port")
198 .HasColumnType(
"int");
200 b.Property<
int>(
"SecurityLevel")
201 .HasColumnType(
"int");
203 b.Property<
long>(
"StartupTimeout")
204 .HasColumnType(
"bigint");
206 b.Property<
long>(
"TopicRequestTimeout")
207 .HasColumnType(
"bigint");
211 b.HasIndex(
"InstanceId")
214 b.ToTable(
"DreamDaemonSettings");
217 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
219 b.Property<
long>(
"Id")
220 .ValueGeneratedOnAdd()
221 .HasColumnType(
"bigint")
222 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
224 b.Property<
int>(
"ApiValidationPort")
225 .HasColumnType(
"int");
227 b.Property<
int>(
"ApiValidationSecurityLevel")
228 .HasColumnType(
"int");
230 b.Property<
long>(
"InstanceId")
231 .HasColumnType(
"bigint");
233 b.Property<
string>(
"ProjectName")
234 .HasColumnType(
"nvarchar(max)")
235 .HasMaxLength(10000);
237 b.Property<
bool?>(
"RequireDMApiValidation")
239 .HasColumnType(
"bit");
243 b.HasIndex(
"InstanceId")
246 b.ToTable(
"DreamMakerSettings");
249 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
251 b.Property<
long>(
"Id")
252 .ValueGeneratedOnAdd()
253 .HasColumnType(
"bigint")
254 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
256 b.Property<
long>(
"AutoUpdateInterval")
257 .HasColumnType(
"bigint");
259 b.Property<
int>(
"ChatBotLimit")
260 .HasColumnType(
"int");
262 b.Property<
int>(
"ConfigurationType")
263 .HasColumnType(
"int");
265 b.Property<
string>(
"Name")
267 .HasColumnType(
"nvarchar(max)")
268 .HasMaxLength(10000);
270 b.Property<
bool?>(
"Online")
272 .HasColumnType(
"bit");
274 b.Property<
string>(
"Path")
276 .HasColumnType(
"nvarchar(450)");
283 b.ToTable(
"Instances");
286 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
288 b.Property<
long>(
"Id")
289 .ValueGeneratedOnAdd()
290 .HasColumnType(
"bigint")
291 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
293 b.Property<decimal>(
"ByondRights")
294 .HasColumnType(
"decimal(20,0)");
296 b.Property<decimal>(
"ChatBotRights")
297 .HasColumnType(
"decimal(20,0)");
299 b.Property<decimal>(
"ConfigurationRights")
300 .HasColumnType(
"decimal(20,0)");
302 b.Property<decimal>(
"DreamDaemonRights")
303 .HasColumnType(
"decimal(20,0)");
305 b.Property<decimal>(
"DreamMakerRights")
306 .HasColumnType(
"decimal(20,0)");
308 b.Property<
long>(
"InstanceId")
309 .HasColumnType(
"bigint");
311 b.Property<decimal>(
"InstancePermissionSetRights")
312 .HasColumnType(
"decimal(20,0)");
314 b.Property<
long>(
"PermissionSetId")
315 .HasColumnType(
"bigint");
317 b.Property<decimal>(
"RepositoryRights")
318 .HasColumnType(
"decimal(20,0)");
322 b.HasIndex(
"InstanceId");
324 b.HasIndex(
"PermissionSetId",
"InstanceId")
327 b.ToTable(
"InstancePermissionSets");
330 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
332 b.Property<
long>(
"Id")
333 .ValueGeneratedOnAdd()
334 .HasColumnType(
"bigint")
335 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
337 b.Property<decimal?>(
"CancelRight")
338 .HasColumnType(
"decimal(20,0)");
340 b.Property<decimal?>(
"CancelRightsType")
341 .HasColumnType(
"decimal(20,0)");
343 b.Property<
bool?>(
"Cancelled")
345 .HasColumnType(
"bit");
347 b.Property<
long?>(
"CancelledById")
348 .HasColumnType(
"bigint");
350 b.Property<
string>(
"Description")
352 .HasColumnType(
"nvarchar(max)");
354 b.Property<
long?>(
"ErrorCode")
355 .HasColumnType(
"bigint");
357 b.Property<
string>(
"ExceptionDetails")
358 .HasColumnType(
"nvarchar(max)");
360 b.Property<
long>(
"InstanceId")
361 .HasColumnType(
"bigint");
363 b.Property<DateTimeOffset?>(
"StartedAt")
365 .HasColumnType(
"datetimeoffset");
367 b.Property<
long>(
"StartedById")
368 .HasColumnType(
"bigint");
370 b.Property<DateTimeOffset?>(
"StoppedAt")
371 .HasColumnType(
"datetimeoffset");
375 b.HasIndex(
"CancelledById");
377 b.HasIndex(
"InstanceId");
379 b.HasIndex(
"StartedById");
384 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
386 b.Property<
long>(
"Id")
387 .ValueGeneratedOnAdd()
388 .HasColumnType(
"bigint")
389 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
391 b.Property<
string>(
"ExternalUserId")
393 .HasColumnType(
"nvarchar(100)")
396 b.Property<
int>(
"Provider")
397 .HasColumnType(
"int");
399 b.Property<
long?>(
"UserId")
400 .HasColumnType(
"bigint");
404 b.HasIndex(
"UserId");
406 b.HasIndex(
"Provider",
"ExternalUserId")
409 b.ToTable(
"OAuthConnections");
412 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
414 b.Property<
long?>(
"Id")
415 .ValueGeneratedOnAdd()
416 .HasColumnType(
"bigint")
417 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
419 b.Property<decimal>(
"AdministrationRights")
420 .HasColumnType(
"decimal(20,0)");
422 b.Property<
long?>(
"GroupId")
423 .HasColumnType(
"bigint");
425 b.Property<decimal>(
"InstanceManagerRights")
426 .HasColumnType(
"decimal(20,0)");
428 b.Property<
long?>(
"UserId")
429 .HasColumnType(
"bigint");
433 b.HasIndex(
"GroupId")
435 .HasFilter(
"[GroupId] IS NOT NULL");
439 .HasFilter(
"[UserId] IS NOT NULL");
441 b.ToTable(
"PermissionSets");
444 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
446 b.Property<
long>(
"Id")
447 .ValueGeneratedOnAdd()
448 .HasColumnType(
"bigint")
449 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
451 b.Property<
string>(
"AccessIdentifier")
453 .HasColumnType(
"nvarchar(max)");
455 b.Property<
long>(
"CompileJobId")
456 .HasColumnType(
"bigint");
458 b.Property<
int>(
"LaunchSecurityLevel")
459 .HasColumnType(
"int");
461 b.Property<
int>(
"Port")
462 .HasColumnType(
"int");
464 b.Property<
int>(
"ProcessId")
465 .HasColumnType(
"int");
467 b.Property<
int>(
"RebootState")
468 .HasColumnType(
"int");
472 b.HasIndex(
"CompileJobId");
474 b.ToTable(
"ReattachInformations");
477 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
479 b.Property<
long>(
"Id")
480 .ValueGeneratedOnAdd()
481 .HasColumnType(
"bigint")
482 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
484 b.Property<
string>(
"AccessToken")
485 .HasColumnType(
"nvarchar(max)")
486 .HasMaxLength(10000);
488 b.Property<
string>(
"AccessUser")
489 .HasColumnType(
"nvarchar(max)")
490 .HasMaxLength(10000);
492 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
494 .HasColumnType(
"bit");
496 b.Property<
bool?>(
"AutoUpdatesSynchronize")
498 .HasColumnType(
"bit");
500 b.Property<
string>(
"CommitterEmail")
502 .HasColumnType(
"nvarchar(max)")
503 .HasMaxLength(10000);
505 b.Property<
string>(
"CommitterName")
507 .HasColumnType(
"nvarchar(max)")
508 .HasMaxLength(10000);
510 b.Property<
bool?>(
"CreateGitHubDeployments")
512 .HasColumnType(
"bit");
514 b.Property<
long>(
"InstanceId")
515 .HasColumnType(
"bigint");
517 b.Property<
bool?>(
"PostTestMergeComment")
519 .HasColumnType(
"bit");
521 b.Property<
bool?>(
"PushTestMergeCommits")
523 .HasColumnType(
"bit");
525 b.Property<
bool?>(
"ShowTestMergeCommitters")
527 .HasColumnType(
"bit");
531 b.HasIndex(
"InstanceId")
534 b.ToTable(
"RepositorySettings");
537 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
539 b.Property<
long>(
"Id")
540 .ValueGeneratedOnAdd()
541 .HasColumnType(
"bigint")
542 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
544 b.Property<
long>(
"RevisionInformationId")
545 .HasColumnType(
"bigint");
547 b.Property<
long>(
"TestMergeId")
548 .HasColumnType(
"bigint");
552 b.HasIndex(
"RevisionInformationId");
554 b.HasIndex(
"TestMergeId");
556 b.ToTable(
"RevInfoTestMerges");
559 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
561 b.Property<
long>(
"Id")
562 .ValueGeneratedOnAdd()
563 .HasColumnType(
"bigint")
564 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
566 b.Property<
string>(
"CommitSha")
568 .HasColumnType(
"nvarchar(40)")
571 b.Property<
long>(
"InstanceId")
572 .HasColumnType(
"bigint");
574 b.Property<
string>(
"OriginCommitSha")
576 .HasColumnType(
"nvarchar(40)")
581 b.HasIndex(
"InstanceId",
"CommitSha")
584 b.ToTable(
"RevisionInformations");
587 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
589 b.Property<
long>(
"Id")
590 .ValueGeneratedOnAdd()
591 .HasColumnType(
"bigint")
592 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
594 b.Property<
string>(
"Author")
596 .HasColumnType(
"nvarchar(max)");
598 b.Property<
string>(
"BodyAtMerge")
600 .HasColumnType(
"nvarchar(max)");
602 b.Property<
string>(
"Comment")
603 .HasColumnType(
"nvarchar(max)")
604 .HasMaxLength(10000);
606 b.Property<DateTimeOffset>(
"MergedAt")
607 .HasColumnType(
"datetimeoffset");
609 b.Property<
long>(
"MergedById")
610 .HasColumnType(
"bigint");
612 b.Property<
int>(
"Number")
613 .HasColumnType(
"int");
615 b.Property<
long?>(
"PrimaryRevisionInformationId")
617 .HasColumnType(
"bigint");
619 b.Property<
string>(
"TargetCommitSha")
621 .HasColumnType(
"nvarchar(40)")
624 b.Property<
string>(
"TitleAtMerge")
626 .HasColumnType(
"nvarchar(max)");
628 b.Property<
string>(
"Url")
630 .HasColumnType(
"nvarchar(max)");
634 b.HasIndex(
"MergedById");
636 b.HasIndex(
"PrimaryRevisionInformationId")
639 b.ToTable(
"TestMerges");
642 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
644 b.Property<
long?>(
"Id")
645 .ValueGeneratedOnAdd()
646 .HasColumnType(
"bigint")
647 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
649 b.Property<
string>(
"CanonicalName")
651 .HasColumnType(
"nvarchar(100)")
654 b.Property<DateTimeOffset?>(
"CreatedAt")
656 .HasColumnType(
"datetimeoffset");
658 b.Property<
long?>(
"CreatedById")
659 .HasColumnType(
"bigint");
661 b.Property<
bool?>(
"Enabled")
663 .HasColumnType(
"bit");
665 b.Property<
long?>(
"GroupId")
666 .HasColumnType(
"bigint");
668 b.Property<DateTimeOffset?>(
"LastPasswordUpdate")
669 .HasColumnType(
"datetimeoffset");
671 b.Property<
string>(
"Name")
673 .HasColumnType(
"nvarchar(100)")
676 b.Property<
string>(
"PasswordHash")
677 .HasColumnType(
"nvarchar(max)");
679 b.Property<
string>(
"SystemIdentifier")
680 .HasColumnType(
"nvarchar(100)")
685 b.HasIndex(
"CanonicalName")
688 b.HasIndex(
"CreatedById");
690 b.HasIndex(
"GroupId");
692 b.HasIndex(
"SystemIdentifier")
694 .HasFilter(
"[SystemIdentifier] IS NOT NULL");
699 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
701 b.Property<
long>(
"Id")
702 .ValueGeneratedOnAdd()
703 .HasColumnType(
"bigint")
704 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
706 b.Property<
string>(
"Name")
708 .HasColumnType(
"nvarchar(100)")
719 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
721 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
722 .WithMany(
"ChatSettings")
723 .HasForeignKey(
"InstanceId")
724 .OnDelete(DeleteBehavior.Cascade)
728 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
730 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
731 .WithMany(
"Channels")
732 .HasForeignKey(
"ChatSettingsId")
733 .OnDelete(DeleteBehavior.Cascade)
737 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
739 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
741 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
742 .OnDelete(DeleteBehavior.Cascade)
745 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
746 .WithMany(
"CompileJobs")
747 .HasForeignKey(
"RevisionInformationId")
748 .OnDelete(DeleteBehavior.ClientNoAction)
752 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
754 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
755 .WithOne(
"DreamDaemonSettings")
756 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
757 .OnDelete(DeleteBehavior.Cascade)
761 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
763 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
764 .WithOne(
"DreamMakerSettings")
765 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
766 .OnDelete(DeleteBehavior.Cascade)
770 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
772 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
773 .WithMany(
"InstancePermissionSets")
774 .HasForeignKey(
"InstanceId")
775 .OnDelete(DeleteBehavior.Cascade)
778 b.HasOne(
"Tgstation.Server.Host.Models.PermissionSet",
"PermissionSet")
779 .WithMany(
"InstancePermissionSets")
780 .HasForeignKey(
"PermissionSetId")
781 .OnDelete(DeleteBehavior.Cascade)
785 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
787 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
789 .HasForeignKey(
"CancelledById");
791 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
793 .HasForeignKey(
"InstanceId")
794 .OnDelete(DeleteBehavior.Cascade)
797 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
799 .HasForeignKey(
"StartedById")
800 .OnDelete(DeleteBehavior.Cascade)
804 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
806 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
807 .WithMany(
"OAuthConnections")
808 .HasForeignKey(
"UserId")
809 .OnDelete(DeleteBehavior.Cascade);
812 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
814 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
815 .WithOne(
"PermissionSet")
816 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"GroupId")
817 .OnDelete(DeleteBehavior.Cascade);
819 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
820 .WithOne(
"PermissionSet")
821 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"UserId")
822 .OnDelete(DeleteBehavior.Cascade);
825 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
827 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
829 .HasForeignKey(
"CompileJobId")
830 .OnDelete(DeleteBehavior.Cascade)
834 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
836 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
837 .WithOne(
"RepositorySettings")
838 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
839 .OnDelete(DeleteBehavior.Cascade)
843 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
845 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
846 .WithMany(
"ActiveTestMerges")
847 .HasForeignKey(
"RevisionInformationId")
848 .OnDelete(DeleteBehavior.Cascade)
851 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
852 .WithMany(
"RevisonInformations")
853 .HasForeignKey(
"TestMergeId")
854 .OnDelete(DeleteBehavior.ClientNoAction)
858 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
860 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
861 .WithMany(
"RevisionInformations")
862 .HasForeignKey(
"InstanceId")
863 .OnDelete(DeleteBehavior.Cascade)
867 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
869 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
870 .WithMany(
"TestMerges")
871 .HasForeignKey(
"MergedById")
872 .OnDelete(DeleteBehavior.Restrict)
875 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
876 .WithOne(
"PrimaryTestMerge")
877 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
878 .OnDelete(DeleteBehavior.Cascade)
882 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
884 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
885 .WithMany(
"CreatedUsers")
886 .HasForeignKey(
"CreatedById");
888 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
890 .HasForeignKey(
"GroupId");
892#pragma warning restore 612, 618