17#pragma warning disable 612, 618
19 .HasAnnotation(
"ProductVersion",
"8.0.13")
20 .HasAnnotation(
"Relational:MaxIdentifierLength", 128);
22 SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
24 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
26 b.Property<
long?>(
"Id")
27 .ValueGeneratedOnAdd()
28 .HasColumnType(
"bigint");
30 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
32 b.Property<
int>(
"ChannelLimit")
33 .HasColumnType(
"int");
35 b.Property<
string>(
"ConnectionString")
38 .HasColumnType(
"nvarchar(max)");
40 b.Property<
bool?>(
"Enabled")
41 .HasColumnType(
"bit");
43 b.Property<
long>(
"InstanceId")
44 .HasColumnType(
"bigint");
46 b.Property<
string>(
"Name")
49 .HasColumnType(
"nvarchar(100)");
51 b.Property<
int>(
"Provider")
52 .HasColumnType(
"int");
54 b.Property<
long>(
"ReconnectionInterval")
55 .HasColumnType(
"bigint");
59 b.HasIndex(
"InstanceId",
"Name")
62 b.ToTable(
"ChatBots");
65 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
67 b.Property<
long>(
"Id")
68 .ValueGeneratedOnAdd()
69 .HasColumnType(
"bigint");
71 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
73 b.Property<
long>(
"ChatSettingsId")
74 .HasColumnType(
"bigint");
76 b.Property<decimal?>(
"DiscordChannelId")
77 .HasColumnType(
"decimal(20,0)");
79 b.Property<
string>(
"IrcChannel")
81 .HasColumnType(
"nvarchar(100)");
83 b.Property<
bool?>(
"IsAdminChannel")
85 .HasColumnType(
"bit");
87 b.Property<
bool?>(
"IsSystemChannel")
89 .HasColumnType(
"bit");
91 b.Property<
bool?>(
"IsUpdatesChannel")
93 .HasColumnType(
"bit");
95 b.Property<
bool?>(
"IsWatchdogChannel")
97 .HasColumnType(
"bit");
99 b.Property<
string>(
"Tag")
101 .HasColumnType(
"nvarchar(max)");
105 b.HasIndex(
"ChatSettingsId",
"DiscordChannelId")
107 .HasFilter(
"[DiscordChannelId] IS NOT NULL");
109 b.HasIndex(
"ChatSettingsId",
"IrcChannel")
111 .HasFilter(
"[IrcChannel] IS NOT NULL");
113 b.ToTable(
"ChatChannels");
116 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
118 b.Property<
long?>(
"Id")
119 .ValueGeneratedOnAdd()
120 .HasColumnType(
"bigint");
122 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
124 b.Property<
int?>(
"DMApiMajorVersion")
125 .HasColumnType(
"int");
127 b.Property<
int?>(
"DMApiMinorVersion")
128 .HasColumnType(
"int");
130 b.Property<
int?>(
"DMApiPatchVersion")
131 .HasColumnType(
"int");
133 b.Property<Guid?>(
"DirectoryName")
135 .HasColumnType(
"uniqueidentifier");
137 b.Property<
string>(
"DmeName")
139 .HasColumnType(
"nvarchar(max)");
141 b.Property<
string>(
"EngineVersion")
143 .HasColumnType(
"nvarchar(max)");
145 b.Property<
long?>(
"GitHubDeploymentId")
146 .HasColumnType(
"bigint");
148 b.Property<
long?>(
"GitHubRepoId")
149 .HasColumnType(
"bigint");
151 b.Property<
long>(
"JobId")
152 .HasColumnType(
"bigint");
154 b.Property<
int?>(
"MinimumSecurityLevel")
155 .HasColumnType(
"int");
157 b.Property<
string>(
"Output")
159 .HasColumnType(
"nvarchar(max)");
161 b.Property<
string>(
"RepositoryOrigin")
162 .HasColumnType(
"nvarchar(max)");
164 b.Property<
long>(
"RevisionInformationId")
165 .HasColumnType(
"bigint");
169 b.HasIndex(
"DirectoryName");
174 b.HasIndex(
"RevisionInformationId");
176 b.ToTable(
"CompileJobs");
179 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
181 b.Property<
long>(
"Id")
182 .ValueGeneratedOnAdd()
183 .HasColumnType(
"bigint");
185 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
187 b.Property<
string>(
"AdditionalParameters")
190 .HasColumnType(
"nvarchar(max)");
192 b.Property<
bool?>(
"AllowWebClient")
194 .HasColumnType(
"bit");
196 b.Property<
bool?>(
"AutoStart")
198 .HasColumnType(
"bit");
200 b.Property<
bool?>(
"DumpOnHealthCheckRestart")
202 .HasColumnType(
"bit");
204 b.Property<
long>(
"HealthCheckSeconds")
205 .HasColumnType(
"bigint");
207 b.Property<
long>(
"InstanceId")
208 .HasColumnType(
"bigint");
210 b.Property<
bool?>(
"LogOutput")
212 .HasColumnType(
"bit");
214 b.Property<
long>(
"MapThreads")
215 .HasColumnType(
"bigint");
217 b.Property<
bool?>(
"Minidumps")
219 .HasColumnType(
"bit");
221 b.Property<
int>(
"OpenDreamTopicPort")
222 .HasColumnType(
"int");
224 b.Property<
int>(
"Port")
225 .HasColumnType(
"int");
227 b.Property<
int>(
"SecurityLevel")
228 .HasColumnType(
"int");
230 b.Property<
bool?>(
"StartProfiler")
232 .HasColumnType(
"bit");
234 b.Property<
long>(
"StartupTimeout")
235 .HasColumnType(
"bigint");
237 b.Property<
long>(
"TopicRequestTimeout")
238 .HasColumnType(
"bigint");
240 b.Property<
int>(
"Visibility")
241 .HasColumnType(
"int");
245 b.HasIndex(
"InstanceId")
248 b.ToTable(
"DreamDaemonSettings");
251 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
253 b.Property<
long>(
"Id")
254 .ValueGeneratedOnAdd()
255 .HasColumnType(
"bigint");
257 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
259 b.Property<
int>(
"ApiValidationPort")
260 .HasColumnType(
"int");
262 b.Property<
int>(
"ApiValidationSecurityLevel")
263 .HasColumnType(
"int");
265 b.Property<
string>(
"CompilerAdditionalArguments")
267 .HasColumnType(
"nvarchar(max)");
269 b.Property<
int>(
"DMApiValidationMode")
270 .HasColumnType(
"int");
272 b.Property<
long>(
"InstanceId")
273 .HasColumnType(
"bigint");
275 b.Property<
string>(
"ProjectName")
277 .HasColumnType(
"nvarchar(max)");
279 b.Property<TimeSpan?>(
"Timeout")
281 .HasColumnType(
"time");
285 b.HasIndex(
"InstanceId")
288 b.ToTable(
"DreamMakerSettings");
291 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
293 b.Property<
long?>(
"Id")
294 .ValueGeneratedOnAdd()
295 .HasColumnType(
"bigint");
297 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
299 b.Property<
string>(
"AutoStartCron")
302 .HasColumnType(
"nvarchar(1000)");
304 b.Property<
string>(
"AutoStopCron")
307 .HasColumnType(
"nvarchar(1000)");
309 b.Property<
string>(
"AutoUpdateCron")
312 .HasColumnType(
"nvarchar(1000)");
314 b.Property<
long>(
"AutoUpdateInterval")
315 .HasColumnType(
"bigint");
317 b.Property<
int>(
"ChatBotLimit")
318 .HasColumnType(
"int");
320 b.Property<
int>(
"ConfigurationType")
321 .HasColumnType(
"int");
323 b.Property<
string>(
"Name")
326 .HasColumnType(
"nvarchar(100)");
328 b.Property<
bool?>(
"Online")
330 .HasColumnType(
"bit");
332 b.Property<
string>(
"Path")
334 .HasColumnType(
"nvarchar(450)");
336 b.Property<
string>(
"SwarmIdentifer")
337 .HasColumnType(
"nvarchar(450)");
341 b.HasIndex(
"Path",
"SwarmIdentifer")
343 .HasFilter(
"[SwarmIdentifer] IS NOT NULL");
345 b.ToTable(
"Instances");
348 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
350 b.Property<
long>(
"Id")
351 .ValueGeneratedOnAdd()
352 .HasColumnType(
"bigint");
354 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
356 b.Property<decimal>(
"ChatBotRights")
357 .HasColumnType(
"decimal(20,0)");
359 b.Property<decimal>(
"ConfigurationRights")
360 .HasColumnType(
"decimal(20,0)");
362 b.Property<decimal>(
"DreamDaemonRights")
363 .HasColumnType(
"decimal(20,0)");
365 b.Property<decimal>(
"DreamMakerRights")
366 .HasColumnType(
"decimal(20,0)");
368 b.Property<decimal>(
"EngineRights")
369 .HasColumnType(
"decimal(20,0)");
371 b.Property<
long>(
"InstanceId")
372 .HasColumnType(
"bigint");
374 b.Property<decimal>(
"InstancePermissionSetRights")
375 .HasColumnType(
"decimal(20,0)");
377 b.Property<
long>(
"PermissionSetId")
378 .HasColumnType(
"bigint");
380 b.Property<decimal>(
"RepositoryRights")
381 .HasColumnType(
"decimal(20,0)");
385 b.HasIndex(
"InstanceId");
387 b.HasIndex(
"PermissionSetId",
"InstanceId")
390 b.ToTable(
"InstancePermissionSets");
393 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
395 b.Property<
long?>(
"Id")
396 .ValueGeneratedOnAdd()
397 .HasColumnType(
"bigint");
399 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
401 b.Property<decimal?>(
"CancelRight")
402 .HasColumnType(
"decimal(20,0)");
404 b.Property<decimal?>(
"CancelRightsType")
405 .HasColumnType(
"decimal(20,0)");
407 b.Property<
bool?>(
"Cancelled")
409 .HasColumnType(
"bit");
411 b.Property<
long?>(
"CancelledById")
412 .HasColumnType(
"bigint");
414 b.Property<
string>(
"Description")
416 .HasColumnType(
"nvarchar(max)");
418 b.Property<
long?>(
"ErrorCode")
419 .HasColumnType(
"bigint");
421 b.Property<
string>(
"ExceptionDetails")
422 .HasColumnType(
"nvarchar(max)");
424 b.Property<
long>(
"InstanceId")
425 .HasColumnType(
"bigint");
427 b.Property<
byte>(
"JobCode")
428 .HasColumnType(
"tinyint");
430 b.Property<DateTimeOffset?>(
"StartedAt")
432 .HasColumnType(
"datetimeoffset");
434 b.Property<
long>(
"StartedById")
435 .HasColumnType(
"bigint");
437 b.Property<DateTimeOffset?>(
"StoppedAt")
438 .HasColumnType(
"datetimeoffset");
442 b.HasIndex(
"CancelledById");
444 b.HasIndex(
"InstanceId");
446 b.HasIndex(
"StartedById");
451 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
453 b.Property<
long>(
"Id")
454 .ValueGeneratedOnAdd()
455 .HasColumnType(
"bigint");
457 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
459 b.Property<
string>(
"ExternalUserId")
462 .HasColumnType(
"nvarchar(100)");
464 b.Property<
int>(
"Provider")
465 .HasColumnType(
"int");
467 b.Property<
long>(
"UserId")
468 .HasColumnType(
"bigint");
472 b.HasIndex(
"UserId");
474 b.HasIndex(
"Provider",
"ExternalUserId")
477 b.ToTable(
"OAuthConnections");
480 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OidcConnection", b =>
482 b.Property<
long>(
"Id")
483 .ValueGeneratedOnAdd()
484 .HasColumnType(
"bigint");
486 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
488 b.Property<
string>(
"ExternalUserId")
491 .HasColumnType(
"nvarchar(100)");
493 b.Property<
string>(
"SchemeKey")
496 .HasColumnType(
"nvarchar(100)");
498 b.Property<
long>(
"UserId")
499 .HasColumnType(
"bigint");
503 b.HasIndex(
"UserId");
505 b.HasIndex(
"SchemeKey",
"ExternalUserId")
508 b.ToTable(
"OidcConnections");
511 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
513 b.Property<
long?>(
"Id")
514 .ValueGeneratedOnAdd()
515 .HasColumnType(
"bigint");
517 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
519 b.Property<decimal>(
"AdministrationRights")
520 .HasColumnType(
"decimal(20,0)");
522 b.Property<
long?>(
"GroupId")
523 .HasColumnType(
"bigint");
525 b.Property<decimal>(
"InstanceManagerRights")
526 .HasColumnType(
"decimal(20,0)");
528 b.Property<
long?>(
"UserId")
529 .HasColumnType(
"bigint");
533 b.HasIndex(
"GroupId")
535 .HasFilter(
"[GroupId] IS NOT NULL");
539 .HasFilter(
"[UserId] IS NOT NULL");
541 b.ToTable(
"PermissionSets");
544 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
546 b.Property<
long?>(
"Id")
547 .ValueGeneratedOnAdd()
548 .HasColumnType(
"bigint");
550 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
552 b.Property<
string>(
"AccessIdentifier")
554 .HasColumnType(
"nvarchar(max)");
556 b.Property<
long>(
"CompileJobId")
557 .HasColumnType(
"bigint");
559 b.Property<
long?>(
"InitialCompileJobId")
560 .HasColumnType(
"bigint");
562 b.Property<
int>(
"LaunchSecurityLevel")
563 .HasColumnType(
"int");
565 b.Property<
int>(
"LaunchVisibility")
566 .HasColumnType(
"int");
568 b.Property<
int>(
"Port")
569 .HasColumnType(
"int");
571 b.Property<
int>(
"ProcessId")
572 .HasColumnType(
"int");
574 b.Property<
int>(
"RebootState")
575 .HasColumnType(
"int");
577 b.Property<
int?>(
"TopicPort")
578 .HasColumnType(
"int");
582 b.HasIndex(
"CompileJobId");
584 b.HasIndex(
"InitialCompileJobId");
586 b.ToTable(
"ReattachInformations");
589 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
591 b.Property<
long>(
"Id")
592 .ValueGeneratedOnAdd()
593 .HasColumnType(
"bigint");
595 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
597 b.Property<
string>(
"AccessToken")
599 .HasColumnType(
"nvarchar(max)");
601 b.Property<
string>(
"AccessUser")
603 .HasColumnType(
"nvarchar(max)");
605 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
607 .HasColumnType(
"bit");
609 b.Property<
bool?>(
"AutoUpdatesSynchronize")
611 .HasColumnType(
"bit");
613 b.Property<
string>(
"CommitterEmail")
616 .HasColumnType(
"nvarchar(max)");
618 b.Property<
string>(
"CommitterName")
621 .HasColumnType(
"nvarchar(max)");
623 b.Property<
bool?>(
"CreateGitHubDeployments")
625 .HasColumnType(
"bit");
627 b.Property<
long>(
"InstanceId")
628 .HasColumnType(
"bigint");
630 b.Property<
bool?>(
"PostTestMergeComment")
632 .HasColumnType(
"bit");
634 b.Property<
bool?>(
"PushTestMergeCommits")
636 .HasColumnType(
"bit");
638 b.Property<
bool?>(
"ShowTestMergeCommitters")
640 .HasColumnType(
"bit");
642 b.Property<
bool?>(
"UpdateSubmodules")
644 .HasColumnType(
"bit");
648 b.HasIndex(
"InstanceId")
651 b.ToTable(
"RepositorySettings");
654 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
656 b.Property<
long>(
"Id")
657 .ValueGeneratedOnAdd()
658 .HasColumnType(
"bigint");
660 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
662 b.Property<
long>(
"RevisionInformationId")
663 .HasColumnType(
"bigint");
665 b.Property<
long>(
"TestMergeId")
666 .HasColumnType(
"bigint");
670 b.HasIndex(
"RevisionInformationId");
672 b.HasIndex(
"TestMergeId");
674 b.ToTable(
"RevInfoTestMerges");
677 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
679 b.Property<
long>(
"Id")
680 .ValueGeneratedOnAdd()
681 .HasColumnType(
"bigint");
683 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
685 b.Property<
string>(
"CommitSha")
688 .HasColumnType(
"nvarchar(40)");
690 b.Property<
long>(
"InstanceId")
691 .HasColumnType(
"bigint");
693 b.Property<
string>(
"OriginCommitSha")
696 .HasColumnType(
"nvarchar(40)");
698 b.Property<DateTimeOffset>(
"Timestamp")
699 .HasColumnType(
"datetimeoffset");
703 b.HasIndex(
"InstanceId",
"CommitSha")
706 b.ToTable(
"RevisionInformations");
709 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
711 b.Property<
long>(
"Id")
712 .ValueGeneratedOnAdd()
713 .HasColumnType(
"bigint");
715 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
717 b.Property<
string>(
"Author")
719 .HasColumnType(
"nvarchar(max)");
721 b.Property<
string>(
"BodyAtMerge")
723 .HasColumnType(
"nvarchar(max)");
725 b.Property<
string>(
"Comment")
727 .HasColumnType(
"nvarchar(max)");
729 b.Property<DateTimeOffset>(
"MergedAt")
730 .HasColumnType(
"datetimeoffset");
732 b.Property<
long>(
"MergedById")
733 .HasColumnType(
"bigint");
735 b.Property<
int>(
"Number")
736 .HasColumnType(
"int");
738 b.Property<
long?>(
"PrimaryRevisionInformationId")
740 .HasColumnType(
"bigint");
742 b.Property<
string>(
"TargetCommitSha")
745 .HasColumnType(
"nvarchar(40)");
747 b.Property<
string>(
"TitleAtMerge")
749 .HasColumnType(
"nvarchar(max)");
751 b.Property<
string>(
"Url")
753 .HasColumnType(
"nvarchar(max)");
757 b.HasIndex(
"MergedById");
759 b.HasIndex(
"PrimaryRevisionInformationId")
762 b.ToTable(
"TestMerges");
765 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
767 b.Property<
long?>(
"Id")
768 .ValueGeneratedOnAdd()
769 .HasColumnType(
"bigint");
771 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
773 b.Property<
string>(
"CanonicalName")
776 .HasColumnType(
"nvarchar(100)");
778 b.Property<DateTimeOffset?>(
"CreatedAt")
780 .HasColumnType(
"datetimeoffset");
782 b.Property<
long?>(
"CreatedById")
783 .HasColumnType(
"bigint");
785 b.Property<
bool?>(
"Enabled")
787 .HasColumnType(
"bit");
789 b.Property<
long?>(
"GroupId")
790 .HasColumnType(
"bigint");
792 b.Property<DateTimeOffset?>(
"LastPasswordUpdate")
793 .HasColumnType(
"datetimeoffset");
795 b.Property<
string>(
"Name")
798 .HasColumnType(
"nvarchar(100)");
800 b.Property<
string>(
"PasswordHash")
801 .HasColumnType(
"nvarchar(max)");
803 b.Property<
string>(
"SystemIdentifier")
805 .HasColumnType(
"nvarchar(100)");
809 b.HasIndex(
"CanonicalName")
812 b.HasIndex(
"CreatedById");
814 b.HasIndex(
"GroupId");
816 b.HasIndex(
"SystemIdentifier")
818 .HasFilter(
"[SystemIdentifier] IS NOT NULL");
823 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
825 b.Property<
long?>(
"Id")
826 .ValueGeneratedOnAdd()
827 .HasColumnType(
"bigint");
829 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
831 b.Property<
string>(
"Name")
834 .HasColumnType(
"nvarchar(100)");
844 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
846 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
847 .WithMany(
"ChatSettings")
848 .HasForeignKey(
"InstanceId")
849 .OnDelete(DeleteBehavior.Cascade)
852 b.Navigation(
"Instance");
855 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
857 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
858 .WithMany(
"Channels")
859 .HasForeignKey(
"ChatSettingsId")
860 .OnDelete(DeleteBehavior.Cascade)
863 b.Navigation(
"ChatSettings");
866 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
868 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
870 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
871 .OnDelete(DeleteBehavior.Cascade)
874 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
875 .WithMany(
"CompileJobs")
876 .HasForeignKey(
"RevisionInformationId")
877 .OnDelete(DeleteBehavior.ClientNoAction)
882 b.Navigation(
"RevisionInformation");
885 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
887 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
888 .WithOne(
"DreamDaemonSettings")
889 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
890 .OnDelete(DeleteBehavior.Cascade)
893 b.Navigation(
"Instance");
896 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
898 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
899 .WithOne(
"DreamMakerSettings")
900 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
901 .OnDelete(DeleteBehavior.Cascade)
904 b.Navigation(
"Instance");
907 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
909 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
910 .WithMany(
"InstancePermissionSets")
911 .HasForeignKey(
"InstanceId")
912 .OnDelete(DeleteBehavior.Cascade)
915 b.HasOne(
"Tgstation.Server.Host.Models.PermissionSet",
"PermissionSet")
916 .WithMany(
"InstancePermissionSets")
917 .HasForeignKey(
"PermissionSetId")
918 .OnDelete(DeleteBehavior.Cascade)
921 b.Navigation(
"Instance");
923 b.Navigation(
"PermissionSet");
926 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
928 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
930 .HasForeignKey(
"CancelledById");
932 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
934 .HasForeignKey(
"InstanceId")
935 .OnDelete(DeleteBehavior.Cascade)
938 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
940 .HasForeignKey(
"StartedById")
941 .OnDelete(DeleteBehavior.Cascade)
944 b.Navigation(
"CancelledBy");
946 b.Navigation(
"Instance");
948 b.Navigation(
"StartedBy");
951 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
953 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
954 .WithMany(
"OAuthConnections")
955 .HasForeignKey(
"UserId")
956 .OnDelete(DeleteBehavior.Cascade)
959 b.Navigation(
"User");
962 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OidcConnection", b =>
964 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
965 .WithMany(
"OidcConnections")
966 .HasForeignKey(
"UserId")
967 .OnDelete(DeleteBehavior.Cascade)
970 b.Navigation(
"User");
973 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
975 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
976 .WithOne(
"PermissionSet")
977 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"GroupId")
978 .OnDelete(DeleteBehavior.Cascade);
980 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
981 .WithOne(
"PermissionSet")
982 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"UserId")
983 .OnDelete(DeleteBehavior.Cascade);
985 b.Navigation(
"Group");
987 b.Navigation(
"User");
990 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
992 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
994 .HasForeignKey(
"CompileJobId")
995 .OnDelete(DeleteBehavior.Cascade)
998 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"InitialCompileJob")
1000 .HasForeignKey(
"InitialCompileJobId");
1002 b.Navigation(
"CompileJob");
1004 b.Navigation(
"InitialCompileJob");
1007 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
1009 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
1010 .WithOne(
"RepositorySettings")
1011 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
1012 .OnDelete(DeleteBehavior.Cascade)
1015 b.Navigation(
"Instance");
1018 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
1020 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
1021 .WithMany(
"ActiveTestMerges")
1022 .HasForeignKey(
"RevisionInformationId")
1023 .OnDelete(DeleteBehavior.Cascade)
1026 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
1027 .WithMany(
"RevisonInformations")
1028 .HasForeignKey(
"TestMergeId")
1029 .OnDelete(DeleteBehavior.ClientNoAction)
1032 b.Navigation(
"RevisionInformation");
1034 b.Navigation(
"TestMerge");
1037 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
1039 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
1040 .WithMany(
"RevisionInformations")
1041 .HasForeignKey(
"InstanceId")
1042 .OnDelete(DeleteBehavior.Cascade)
1045 b.Navigation(
"Instance");
1048 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
1050 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
1051 .WithMany(
"TestMerges")
1052 .HasForeignKey(
"MergedById")
1053 .OnDelete(DeleteBehavior.Restrict)
1056 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
1057 .WithOne(
"PrimaryTestMerge")
1058 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
1059 .OnDelete(DeleteBehavior.Cascade)
1062 b.Navigation(
"MergedBy");
1064 b.Navigation(
"PrimaryRevisionInformation");
1067 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
1069 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
1070 .WithMany(
"CreatedUsers")
1071 .HasForeignKey(
"CreatedById");
1073 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
1075 .HasForeignKey(
"GroupId");
1077 b.Navigation(
"CreatedBy");
1079 b.Navigation(
"Group");
1082 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
1084 b.Navigation(
"Channels");
1087 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
1089 b.Navigation(
"ChatSettings");
1091 b.Navigation(
"DreamDaemonSettings");
1093 b.Navigation(
"DreamMakerSettings");
1095 b.Navigation(
"InstancePermissionSets");
1097 b.Navigation(
"Jobs");
1099 b.Navigation(
"RepositorySettings");
1101 b.Navigation(
"RevisionInformations");
1104 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
1106 b.Navigation(
"InstancePermissionSets");
1109 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
1111 b.Navigation(
"ActiveTestMerges");
1113 b.Navigation(
"CompileJobs");
1115 b.Navigation(
"PrimaryTestMerge");
1118 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
1120 b.Navigation(
"RevisonInformations");
1123 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
1125 b.Navigation(
"CreatedUsers");
1127 b.Navigation(
"OAuthConnections");
1129 b.Navigation(
"OidcConnections");
1131 b.Navigation(
"PermissionSet");
1133 b.Navigation(
"TestMerges");
1136 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
1138 b.Navigation(
"PermissionSet")
1141 b.Navigation(
"Users");
1143#pragma warning restore 612, 618