17#pragma warning disable 612, 618
19 .HasAnnotation(
"ProductVersion",
"3.1.18")
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");
209 b.Property<
int>(
"Visibility")
210 .HasColumnType(
"int");
214 b.HasIndex(
"InstanceId")
217 b.ToTable(
"DreamDaemonSettings");
220 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
222 b.Property<
long>(
"Id")
223 .ValueGeneratedOnAdd()
224 .HasColumnType(
"bigint")
225 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
227 b.Property<
int>(
"ApiValidationPort")
228 .HasColumnType(
"int");
230 b.Property<
int>(
"ApiValidationSecurityLevel")
231 .HasColumnType(
"int");
233 b.Property<
long>(
"InstanceId")
234 .HasColumnType(
"bigint");
236 b.Property<
string>(
"ProjectName")
237 .HasColumnType(
"nvarchar(max)")
238 .HasMaxLength(10000);
240 b.Property<
bool?>(
"RequireDMApiValidation")
242 .HasColumnType(
"bit");
246 b.HasIndex(
"InstanceId")
249 b.ToTable(
"DreamMakerSettings");
252 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
254 b.Property<
long?>(
"Id")
255 .ValueGeneratedOnAdd()
256 .HasColumnType(
"bigint")
257 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
259 b.Property<
long>(
"AutoUpdateInterval")
260 .HasColumnType(
"bigint");
262 b.Property<
int>(
"ChatBotLimit")
263 .HasColumnType(
"int");
265 b.Property<
int>(
"ConfigurationType")
266 .HasColumnType(
"int");
268 b.Property<
string>(
"Name")
270 .HasColumnType(
"nvarchar(100)")
273 b.Property<
bool?>(
"Online")
275 .HasColumnType(
"bit");
277 b.Property<
string>(
"Path")
279 .HasColumnType(
"nvarchar(450)");
281 b.Property<
string>(
"SwarmIdentifer")
282 .HasColumnType(
"nvarchar(450)");
286 b.HasIndex(
"Path",
"SwarmIdentifer")
288 .HasFilter(
"[SwarmIdentifer] IS NOT NULL");
290 b.ToTable(
"Instances");
293 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
295 b.Property<
long>(
"Id")
296 .ValueGeneratedOnAdd()
297 .HasColumnType(
"bigint")
298 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
300 b.Property<decimal>(
"ByondRights")
301 .HasColumnType(
"decimal(20,0)");
303 b.Property<decimal>(
"ChatBotRights")
304 .HasColumnType(
"decimal(20,0)");
306 b.Property<decimal>(
"ConfigurationRights")
307 .HasColumnType(
"decimal(20,0)");
309 b.Property<decimal>(
"DreamDaemonRights")
310 .HasColumnType(
"decimal(20,0)");
312 b.Property<decimal>(
"DreamMakerRights")
313 .HasColumnType(
"decimal(20,0)");
315 b.Property<
long>(
"InstanceId")
316 .HasColumnType(
"bigint");
318 b.Property<decimal>(
"InstancePermissionSetRights")
319 .HasColumnType(
"decimal(20,0)");
321 b.Property<
long>(
"PermissionSetId")
322 .HasColumnType(
"bigint");
324 b.Property<decimal>(
"RepositoryRights")
325 .HasColumnType(
"decimal(20,0)");
329 b.HasIndex(
"InstanceId");
331 b.HasIndex(
"PermissionSetId",
"InstanceId")
334 b.ToTable(
"InstancePermissionSets");
337 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
339 b.Property<
long?>(
"Id")
340 .ValueGeneratedOnAdd()
341 .HasColumnType(
"bigint")
342 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
344 b.Property<decimal?>(
"CancelRight")
345 .HasColumnType(
"decimal(20,0)");
347 b.Property<decimal?>(
"CancelRightsType")
348 .HasColumnType(
"decimal(20,0)");
350 b.Property<
bool?>(
"Cancelled")
352 .HasColumnType(
"bit");
354 b.Property<
long?>(
"CancelledById")
355 .HasColumnType(
"bigint");
357 b.Property<
string>(
"Description")
359 .HasColumnType(
"nvarchar(max)");
361 b.Property<
long?>(
"ErrorCode")
362 .HasColumnType(
"bigint");
364 b.Property<
string>(
"ExceptionDetails")
365 .HasColumnType(
"nvarchar(max)");
367 b.Property<
long>(
"InstanceId")
368 .HasColumnType(
"bigint");
370 b.Property<DateTimeOffset?>(
"StartedAt")
372 .HasColumnType(
"datetimeoffset");
374 b.Property<
long>(
"StartedById")
375 .HasColumnType(
"bigint");
377 b.Property<DateTimeOffset?>(
"StoppedAt")
378 .HasColumnType(
"datetimeoffset");
382 b.HasIndex(
"CancelledById");
384 b.HasIndex(
"InstanceId");
386 b.HasIndex(
"StartedById");
391 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
393 b.Property<
long>(
"Id")
394 .ValueGeneratedOnAdd()
395 .HasColumnType(
"bigint")
396 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
398 b.Property<
string>(
"ExternalUserId")
400 .HasColumnType(
"nvarchar(100)")
403 b.Property<
int>(
"Provider")
404 .HasColumnType(
"int");
406 b.Property<
long?>(
"UserId")
407 .HasColumnType(
"bigint");
411 b.HasIndex(
"UserId");
413 b.HasIndex(
"Provider",
"ExternalUserId")
416 b.ToTable(
"OAuthConnections");
419 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
421 b.Property<
long?>(
"Id")
422 .ValueGeneratedOnAdd()
423 .HasColumnType(
"bigint")
424 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
426 b.Property<decimal>(
"AdministrationRights")
427 .HasColumnType(
"decimal(20,0)");
429 b.Property<
long?>(
"GroupId")
430 .HasColumnType(
"bigint");
432 b.Property<decimal>(
"InstanceManagerRights")
433 .HasColumnType(
"decimal(20,0)");
435 b.Property<
long?>(
"UserId")
436 .HasColumnType(
"bigint");
440 b.HasIndex(
"GroupId")
442 .HasFilter(
"[GroupId] IS NOT NULL");
446 .HasFilter(
"[UserId] IS NOT NULL");
448 b.ToTable(
"PermissionSets");
451 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
453 b.Property<
long>(
"Id")
454 .ValueGeneratedOnAdd()
455 .HasColumnType(
"bigint")
456 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
458 b.Property<
string>(
"AccessIdentifier")
460 .HasColumnType(
"nvarchar(max)");
462 b.Property<
long>(
"CompileJobId")
463 .HasColumnType(
"bigint");
465 b.Property<
int>(
"LaunchSecurityLevel")
466 .HasColumnType(
"int");
468 b.Property<
int>(
"LaunchVisibility")
469 .HasColumnType(
"int");
471 b.Property<
int>(
"Port")
472 .HasColumnType(
"int");
474 b.Property<
int>(
"ProcessId")
475 .HasColumnType(
"int");
477 b.Property<
int>(
"RebootState")
478 .HasColumnType(
"int");
482 b.HasIndex(
"CompileJobId");
484 b.ToTable(
"ReattachInformations");
487 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
489 b.Property<
long>(
"Id")
490 .ValueGeneratedOnAdd()
491 .HasColumnType(
"bigint")
492 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
494 b.Property<
string>(
"AccessToken")
495 .HasColumnType(
"nvarchar(max)")
496 .HasMaxLength(10000);
498 b.Property<
string>(
"AccessUser")
499 .HasColumnType(
"nvarchar(max)")
500 .HasMaxLength(10000);
502 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
504 .HasColumnType(
"bit");
506 b.Property<
bool?>(
"AutoUpdatesSynchronize")
508 .HasColumnType(
"bit");
510 b.Property<
string>(
"CommitterEmail")
512 .HasColumnType(
"nvarchar(max)")
513 .HasMaxLength(10000);
515 b.Property<
string>(
"CommitterName")
517 .HasColumnType(
"nvarchar(max)")
518 .HasMaxLength(10000);
520 b.Property<
bool?>(
"CreateGitHubDeployments")
522 .HasColumnType(
"bit");
524 b.Property<
long>(
"InstanceId")
525 .HasColumnType(
"bigint");
527 b.Property<
bool?>(
"PostTestMergeComment")
529 .HasColumnType(
"bit");
531 b.Property<
bool?>(
"PushTestMergeCommits")
533 .HasColumnType(
"bit");
535 b.Property<
bool?>(
"ShowTestMergeCommitters")
537 .HasColumnType(
"bit");
541 b.HasIndex(
"InstanceId")
544 b.ToTable(
"RepositorySettings");
547 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
549 b.Property<
long>(
"Id")
550 .ValueGeneratedOnAdd()
551 .HasColumnType(
"bigint")
552 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
554 b.Property<
long>(
"RevisionInformationId")
555 .HasColumnType(
"bigint");
557 b.Property<
long>(
"TestMergeId")
558 .HasColumnType(
"bigint");
562 b.HasIndex(
"RevisionInformationId");
564 b.HasIndex(
"TestMergeId");
566 b.ToTable(
"RevInfoTestMerges");
569 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
571 b.Property<
long>(
"Id")
572 .ValueGeneratedOnAdd()
573 .HasColumnType(
"bigint")
574 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
576 b.Property<
string>(
"CommitSha")
578 .HasColumnType(
"nvarchar(40)")
581 b.Property<
long>(
"InstanceId")
582 .HasColumnType(
"bigint");
584 b.Property<
string>(
"OriginCommitSha")
586 .HasColumnType(
"nvarchar(40)")
589 b.Property<DateTimeOffset>(
"Timestamp")
590 .HasColumnType(
"datetimeoffset");
594 b.HasIndex(
"InstanceId",
"CommitSha")
597 b.ToTable(
"RevisionInformations");
600 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
602 b.Property<
long>(
"Id")
603 .ValueGeneratedOnAdd()
604 .HasColumnType(
"bigint")
605 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
607 b.Property<
string>(
"Author")
609 .HasColumnType(
"nvarchar(max)");
611 b.Property<
string>(
"BodyAtMerge")
613 .HasColumnType(
"nvarchar(max)");
615 b.Property<
string>(
"Comment")
616 .HasColumnType(
"nvarchar(max)")
617 .HasMaxLength(10000);
619 b.Property<DateTimeOffset>(
"MergedAt")
620 .HasColumnType(
"datetimeoffset");
622 b.Property<
long>(
"MergedById")
623 .HasColumnType(
"bigint");
625 b.Property<
int>(
"Number")
626 .HasColumnType(
"int");
628 b.Property<
long?>(
"PrimaryRevisionInformationId")
630 .HasColumnType(
"bigint");
632 b.Property<
string>(
"TargetCommitSha")
634 .HasColumnType(
"nvarchar(40)")
637 b.Property<
string>(
"TitleAtMerge")
639 .HasColumnType(
"nvarchar(max)");
641 b.Property<
string>(
"Url")
643 .HasColumnType(
"nvarchar(max)");
647 b.HasIndex(
"MergedById");
649 b.HasIndex(
"PrimaryRevisionInformationId")
652 b.ToTable(
"TestMerges");
655 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
657 b.Property<
long?>(
"Id")
658 .ValueGeneratedOnAdd()
659 .HasColumnType(
"bigint")
660 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
662 b.Property<
string>(
"CanonicalName")
664 .HasColumnType(
"nvarchar(100)")
667 b.Property<DateTimeOffset?>(
"CreatedAt")
669 .HasColumnType(
"datetimeoffset");
671 b.Property<
long?>(
"CreatedById")
672 .HasColumnType(
"bigint");
674 b.Property<
bool?>(
"Enabled")
676 .HasColumnType(
"bit");
678 b.Property<
long?>(
"GroupId")
679 .HasColumnType(
"bigint");
681 b.Property<DateTimeOffset?>(
"LastPasswordUpdate")
682 .HasColumnType(
"datetimeoffset");
684 b.Property<
string>(
"Name")
686 .HasColumnType(
"nvarchar(100)")
689 b.Property<
string>(
"PasswordHash")
690 .HasColumnType(
"nvarchar(max)");
692 b.Property<
string>(
"SystemIdentifier")
693 .HasColumnType(
"nvarchar(100)")
698 b.HasIndex(
"CanonicalName")
701 b.HasIndex(
"CreatedById");
703 b.HasIndex(
"GroupId");
705 b.HasIndex(
"SystemIdentifier")
707 .HasFilter(
"[SystemIdentifier] IS NOT NULL");
712 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
714 b.Property<
long?>(
"Id")
715 .ValueGeneratedOnAdd()
716 .HasColumnType(
"bigint")
717 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
719 b.Property<
string>(
"Name")
721 .HasColumnType(
"nvarchar(100)")
732 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
734 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
735 .WithMany(
"ChatSettings")
736 .HasForeignKey(
"InstanceId")
737 .OnDelete(DeleteBehavior.Cascade)
741 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
743 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
744 .WithMany(
"Channels")
745 .HasForeignKey(
"ChatSettingsId")
746 .OnDelete(DeleteBehavior.Cascade)
750 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
752 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
754 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
755 .OnDelete(DeleteBehavior.Cascade)
758 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
759 .WithMany(
"CompileJobs")
760 .HasForeignKey(
"RevisionInformationId")
761 .OnDelete(DeleteBehavior.ClientNoAction)
765 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
767 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
768 .WithOne(
"DreamDaemonSettings")
769 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
770 .OnDelete(DeleteBehavior.Cascade)
774 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
776 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
777 .WithOne(
"DreamMakerSettings")
778 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
779 .OnDelete(DeleteBehavior.Cascade)
783 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
785 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
786 .WithMany(
"InstancePermissionSets")
787 .HasForeignKey(
"InstanceId")
788 .OnDelete(DeleteBehavior.Cascade)
791 b.HasOne(
"Tgstation.Server.Host.Models.PermissionSet",
"PermissionSet")
792 .WithMany(
"InstancePermissionSets")
793 .HasForeignKey(
"PermissionSetId")
794 .OnDelete(DeleteBehavior.Cascade)
798 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
800 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
802 .HasForeignKey(
"CancelledById");
804 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
806 .HasForeignKey(
"InstanceId")
807 .OnDelete(DeleteBehavior.Cascade)
810 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
812 .HasForeignKey(
"StartedById")
813 .OnDelete(DeleteBehavior.Cascade)
817 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
819 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
820 .WithMany(
"OAuthConnections")
821 .HasForeignKey(
"UserId")
822 .OnDelete(DeleteBehavior.Cascade);
825 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
827 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
828 .WithOne(
"PermissionSet")
829 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"GroupId")
830 .OnDelete(DeleteBehavior.Cascade);
832 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
833 .WithOne(
"PermissionSet")
834 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"UserId")
835 .OnDelete(DeleteBehavior.Cascade);
838 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
840 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
842 .HasForeignKey(
"CompileJobId")
843 .OnDelete(DeleteBehavior.Cascade)
847 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
849 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
850 .WithOne(
"RepositorySettings")
851 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
852 .OnDelete(DeleteBehavior.Cascade)
856 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
858 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
859 .WithMany(
"ActiveTestMerges")
860 .HasForeignKey(
"RevisionInformationId")
861 .OnDelete(DeleteBehavior.Cascade)
864 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
865 .WithMany(
"RevisonInformations")
866 .HasForeignKey(
"TestMergeId")
867 .OnDelete(DeleteBehavior.ClientNoAction)
871 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
873 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
874 .WithMany(
"RevisionInformations")
875 .HasForeignKey(
"InstanceId")
876 .OnDelete(DeleteBehavior.Cascade)
880 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
882 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
883 .WithMany(
"TestMerges")
884 .HasForeignKey(
"MergedById")
885 .OnDelete(DeleteBehavior.Restrict)
888 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
889 .WithOne(
"PrimaryTestMerge")
890 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
891 .OnDelete(DeleteBehavior.Cascade)
895 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
897 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
898 .WithMany(
"CreatedUsers")
899 .HasForeignKey(
"CreatedById");
901 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
903 .HasForeignKey(
"GroupId");
905#pragma warning restore 612, 618