17#pragma warning disable 612, 618
19 .HasAnnotation(
"ProductVersion",
"8.0.4")
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<
int?>(
"GitHubDeploymentId")
146 .HasColumnType(
"int");
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>(
"Port")
222 .HasColumnType(
"int");
224 b.Property<
int>(
"SecurityLevel")
225 .HasColumnType(
"int");
227 b.Property<
bool?>(
"StartProfiler")
229 .HasColumnType(
"bit");
231 b.Property<
long>(
"StartupTimeout")
232 .HasColumnType(
"bigint");
234 b.Property<
long>(
"TopicRequestTimeout")
235 .HasColumnType(
"bigint");
237 b.Property<
int>(
"Visibility")
238 .HasColumnType(
"int");
242 b.HasIndex(
"InstanceId")
245 b.ToTable(
"DreamDaemonSettings");
248 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
250 b.Property<
long>(
"Id")
251 .ValueGeneratedOnAdd()
252 .HasColumnType(
"bigint");
254 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
256 b.Property<
int>(
"ApiValidationPort")
257 .HasColumnType(
"int");
259 b.Property<
int>(
"ApiValidationSecurityLevel")
260 .HasColumnType(
"int");
262 b.Property<
string>(
"CompilerAdditionalArguments")
264 .HasColumnType(
"nvarchar(max)");
266 b.Property<
long>(
"InstanceId")
267 .HasColumnType(
"bigint");
269 b.Property<
string>(
"ProjectName")
271 .HasColumnType(
"nvarchar(max)");
273 b.Property<
bool?>(
"RequireDMApiValidation")
275 .HasColumnType(
"bit");
277 b.Property<TimeSpan?>(
"Timeout")
279 .HasColumnType(
"time");
283 b.HasIndex(
"InstanceId")
286 b.ToTable(
"DreamMakerSettings");
289 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
291 b.Property<
long?>(
"Id")
292 .ValueGeneratedOnAdd()
293 .HasColumnType(
"bigint");
295 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
297 b.Property<
long>(
"AutoUpdateInterval")
298 .HasColumnType(
"bigint");
300 b.Property<
int>(
"ChatBotLimit")
301 .HasColumnType(
"int");
303 b.Property<
int>(
"ConfigurationType")
304 .HasColumnType(
"int");
306 b.Property<
string>(
"Name")
309 .HasColumnType(
"nvarchar(100)");
311 b.Property<
bool?>(
"Online")
313 .HasColumnType(
"bit");
315 b.Property<
string>(
"Path")
317 .HasColumnType(
"nvarchar(450)");
319 b.Property<
string>(
"SwarmIdentifer")
320 .HasColumnType(
"nvarchar(450)");
324 b.HasIndex(
"Path",
"SwarmIdentifer")
326 .HasFilter(
"[SwarmIdentifer] IS NOT NULL");
328 b.ToTable(
"Instances");
331 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
333 b.Property<
long>(
"Id")
334 .ValueGeneratedOnAdd()
335 .HasColumnType(
"bigint");
337 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
339 b.Property<decimal>(
"ChatBotRights")
340 .HasColumnType(
"decimal(20,0)");
342 b.Property<decimal>(
"ConfigurationRights")
343 .HasColumnType(
"decimal(20,0)");
345 b.Property<decimal>(
"DreamDaemonRights")
346 .HasColumnType(
"decimal(20,0)");
348 b.Property<decimal>(
"DreamMakerRights")
349 .HasColumnType(
"decimal(20,0)");
351 b.Property<decimal>(
"EngineRights")
352 .HasColumnType(
"decimal(20,0)");
354 b.Property<
long>(
"InstanceId")
355 .HasColumnType(
"bigint");
357 b.Property<decimal>(
"InstancePermissionSetRights")
358 .HasColumnType(
"decimal(20,0)");
360 b.Property<
long>(
"PermissionSetId")
361 .HasColumnType(
"bigint");
363 b.Property<decimal>(
"RepositoryRights")
364 .HasColumnType(
"decimal(20,0)");
368 b.HasIndex(
"InstanceId");
370 b.HasIndex(
"PermissionSetId",
"InstanceId")
373 b.ToTable(
"InstancePermissionSets");
376 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
378 b.Property<
long?>(
"Id")
379 .ValueGeneratedOnAdd()
380 .HasColumnType(
"bigint");
382 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
384 b.Property<decimal?>(
"CancelRight")
385 .HasColumnType(
"decimal(20,0)");
387 b.Property<decimal?>(
"CancelRightsType")
388 .HasColumnType(
"decimal(20,0)");
390 b.Property<
bool?>(
"Cancelled")
392 .HasColumnType(
"bit");
394 b.Property<
long?>(
"CancelledById")
395 .HasColumnType(
"bigint");
397 b.Property<
string>(
"Description")
399 .HasColumnType(
"nvarchar(max)");
401 b.Property<
long?>(
"ErrorCode")
402 .HasColumnType(
"bigint");
404 b.Property<
string>(
"ExceptionDetails")
405 .HasColumnType(
"nvarchar(max)");
407 b.Property<
long>(
"InstanceId")
408 .HasColumnType(
"bigint");
410 b.Property<
byte>(
"JobCode")
411 .HasColumnType(
"tinyint");
413 b.Property<DateTimeOffset?>(
"StartedAt")
415 .HasColumnType(
"datetimeoffset");
417 b.Property<
long>(
"StartedById")
418 .HasColumnType(
"bigint");
420 b.Property<DateTimeOffset?>(
"StoppedAt")
421 .HasColumnType(
"datetimeoffset");
425 b.HasIndex(
"CancelledById");
427 b.HasIndex(
"InstanceId");
429 b.HasIndex(
"StartedById");
434 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
436 b.Property<
long>(
"Id")
437 .ValueGeneratedOnAdd()
438 .HasColumnType(
"bigint");
440 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
442 b.Property<
string>(
"ExternalUserId")
445 .HasColumnType(
"nvarchar(100)");
447 b.Property<
int>(
"Provider")
448 .HasColumnType(
"int");
450 b.Property<
long?>(
"UserId")
451 .HasColumnType(
"bigint");
455 b.HasIndex(
"UserId");
457 b.HasIndex(
"Provider",
"ExternalUserId")
460 b.ToTable(
"OAuthConnections");
463 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
465 b.Property<
long?>(
"Id")
466 .ValueGeneratedOnAdd()
467 .HasColumnType(
"bigint");
469 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
471 b.Property<decimal>(
"AdministrationRights")
472 .HasColumnType(
"decimal(20,0)");
474 b.Property<
long?>(
"GroupId")
475 .HasColumnType(
"bigint");
477 b.Property<decimal>(
"InstanceManagerRights")
478 .HasColumnType(
"decimal(20,0)");
480 b.Property<
long?>(
"UserId")
481 .HasColumnType(
"bigint");
485 b.HasIndex(
"GroupId")
487 .HasFilter(
"[GroupId] IS NOT NULL");
491 .HasFilter(
"[UserId] IS NOT NULL");
493 b.ToTable(
"PermissionSets");
496 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
498 b.Property<
long?>(
"Id")
499 .ValueGeneratedOnAdd()
500 .HasColumnType(
"bigint");
502 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
504 b.Property<
string>(
"AccessIdentifier")
506 .HasColumnType(
"nvarchar(max)");
508 b.Property<
long>(
"CompileJobId")
509 .HasColumnType(
"bigint");
511 b.Property<
long?>(
"InitialCompileJobId")
512 .HasColumnType(
"bigint");
514 b.Property<
int>(
"LaunchSecurityLevel")
515 .HasColumnType(
"int");
517 b.Property<
int>(
"LaunchVisibility")
518 .HasColumnType(
"int");
520 b.Property<
int>(
"Port")
521 .HasColumnType(
"int");
523 b.Property<
int>(
"ProcessId")
524 .HasColumnType(
"int");
526 b.Property<
int>(
"RebootState")
527 .HasColumnType(
"int");
529 b.Property<
int?>(
"TopicPort")
530 .HasColumnType(
"int");
534 b.HasIndex(
"CompileJobId");
536 b.HasIndex(
"InitialCompileJobId");
538 b.ToTable(
"ReattachInformations");
541 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
543 b.Property<
long>(
"Id")
544 .ValueGeneratedOnAdd()
545 .HasColumnType(
"bigint");
547 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
549 b.Property<
string>(
"AccessToken")
551 .HasColumnType(
"nvarchar(max)");
553 b.Property<
string>(
"AccessUser")
555 .HasColumnType(
"nvarchar(max)");
557 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
559 .HasColumnType(
"bit");
561 b.Property<
bool?>(
"AutoUpdatesSynchronize")
563 .HasColumnType(
"bit");
565 b.Property<
string>(
"CommitterEmail")
568 .HasColumnType(
"nvarchar(max)");
570 b.Property<
string>(
"CommitterName")
573 .HasColumnType(
"nvarchar(max)");
575 b.Property<
bool?>(
"CreateGitHubDeployments")
577 .HasColumnType(
"bit");
579 b.Property<
long>(
"InstanceId")
580 .HasColumnType(
"bigint");
582 b.Property<
bool?>(
"PostTestMergeComment")
584 .HasColumnType(
"bit");
586 b.Property<
bool?>(
"PushTestMergeCommits")
588 .HasColumnType(
"bit");
590 b.Property<
bool?>(
"ShowTestMergeCommitters")
592 .HasColumnType(
"bit");
594 b.Property<
bool?>(
"UpdateSubmodules")
596 .HasColumnType(
"bit");
600 b.HasIndex(
"InstanceId")
603 b.ToTable(
"RepositorySettings");
606 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
608 b.Property<
long>(
"Id")
609 .ValueGeneratedOnAdd()
610 .HasColumnType(
"bigint");
612 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
614 b.Property<
long>(
"RevisionInformationId")
615 .HasColumnType(
"bigint");
617 b.Property<
long>(
"TestMergeId")
618 .HasColumnType(
"bigint");
622 b.HasIndex(
"RevisionInformationId");
624 b.HasIndex(
"TestMergeId");
626 b.ToTable(
"RevInfoTestMerges");
629 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
631 b.Property<
long>(
"Id")
632 .ValueGeneratedOnAdd()
633 .HasColumnType(
"bigint");
635 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
637 b.Property<
string>(
"CommitSha")
640 .HasColumnType(
"nvarchar(40)");
642 b.Property<
long>(
"InstanceId")
643 .HasColumnType(
"bigint");
645 b.Property<
string>(
"OriginCommitSha")
648 .HasColumnType(
"nvarchar(40)");
650 b.Property<DateTimeOffset>(
"Timestamp")
651 .HasColumnType(
"datetimeoffset");
655 b.HasIndex(
"InstanceId",
"CommitSha")
658 b.ToTable(
"RevisionInformations");
661 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
663 b.Property<
long>(
"Id")
664 .ValueGeneratedOnAdd()
665 .HasColumnType(
"bigint");
667 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
669 b.Property<
string>(
"Author")
671 .HasColumnType(
"nvarchar(max)");
673 b.Property<
string>(
"BodyAtMerge")
675 .HasColumnType(
"nvarchar(max)");
677 b.Property<
string>(
"Comment")
679 .HasColumnType(
"nvarchar(max)");
681 b.Property<DateTimeOffset>(
"MergedAt")
682 .HasColumnType(
"datetimeoffset");
684 b.Property<
long>(
"MergedById")
685 .HasColumnType(
"bigint");
687 b.Property<
int>(
"Number")
688 .HasColumnType(
"int");
690 b.Property<
long?>(
"PrimaryRevisionInformationId")
692 .HasColumnType(
"bigint");
694 b.Property<
string>(
"TargetCommitSha")
697 .HasColumnType(
"nvarchar(40)");
699 b.Property<
string>(
"TitleAtMerge")
701 .HasColumnType(
"nvarchar(max)");
703 b.Property<
string>(
"Url")
705 .HasColumnType(
"nvarchar(max)");
709 b.HasIndex(
"MergedById");
711 b.HasIndex(
"PrimaryRevisionInformationId")
714 b.ToTable(
"TestMerges");
717 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
719 b.Property<
long?>(
"Id")
720 .ValueGeneratedOnAdd()
721 .HasColumnType(
"bigint");
723 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
725 b.Property<
string>(
"CanonicalName")
728 .HasColumnType(
"nvarchar(100)");
730 b.Property<DateTimeOffset?>(
"CreatedAt")
732 .HasColumnType(
"datetimeoffset");
734 b.Property<
long?>(
"CreatedById")
735 .HasColumnType(
"bigint");
737 b.Property<
bool?>(
"Enabled")
739 .HasColumnType(
"bit");
741 b.Property<
long?>(
"GroupId")
742 .HasColumnType(
"bigint");
744 b.Property<DateTimeOffset?>(
"LastPasswordUpdate")
745 .HasColumnType(
"datetimeoffset");
747 b.Property<
string>(
"Name")
750 .HasColumnType(
"nvarchar(100)");
752 b.Property<
string>(
"PasswordHash")
753 .HasColumnType(
"nvarchar(max)");
755 b.Property<
string>(
"SystemIdentifier")
757 .HasColumnType(
"nvarchar(100)");
761 b.HasIndex(
"CanonicalName")
764 b.HasIndex(
"CreatedById");
766 b.HasIndex(
"GroupId");
768 b.HasIndex(
"SystemIdentifier")
770 .HasFilter(
"[SystemIdentifier] IS NOT NULL");
775 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
777 b.Property<
long?>(
"Id")
778 .ValueGeneratedOnAdd()
779 .HasColumnType(
"bigint");
781 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
783 b.Property<
string>(
"Name")
786 .HasColumnType(
"nvarchar(100)");
796 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
798 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
799 .WithMany(
"ChatSettings")
800 .HasForeignKey(
"InstanceId")
801 .OnDelete(DeleteBehavior.Cascade)
804 b.Navigation(
"Instance");
807 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
809 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
810 .WithMany(
"Channels")
811 .HasForeignKey(
"ChatSettingsId")
812 .OnDelete(DeleteBehavior.Cascade)
815 b.Navigation(
"ChatSettings");
818 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
820 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
822 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
823 .OnDelete(DeleteBehavior.Cascade)
826 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
827 .WithMany(
"CompileJobs")
828 .HasForeignKey(
"RevisionInformationId")
829 .OnDelete(DeleteBehavior.ClientNoAction)
834 b.Navigation(
"RevisionInformation");
837 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
839 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
840 .WithOne(
"DreamDaemonSettings")
841 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
842 .OnDelete(DeleteBehavior.Cascade)
845 b.Navigation(
"Instance");
848 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
850 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
851 .WithOne(
"DreamMakerSettings")
852 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
853 .OnDelete(DeleteBehavior.Cascade)
856 b.Navigation(
"Instance");
859 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
861 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
862 .WithMany(
"InstancePermissionSets")
863 .HasForeignKey(
"InstanceId")
864 .OnDelete(DeleteBehavior.Cascade)
867 b.HasOne(
"Tgstation.Server.Host.Models.PermissionSet",
"PermissionSet")
868 .WithMany(
"InstancePermissionSets")
869 .HasForeignKey(
"PermissionSetId")
870 .OnDelete(DeleteBehavior.Cascade)
873 b.Navigation(
"Instance");
875 b.Navigation(
"PermissionSet");
878 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
880 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
882 .HasForeignKey(
"CancelledById");
884 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
886 .HasForeignKey(
"InstanceId")
887 .OnDelete(DeleteBehavior.Cascade)
890 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
892 .HasForeignKey(
"StartedById")
893 .OnDelete(DeleteBehavior.Cascade)
896 b.Navigation(
"CancelledBy");
898 b.Navigation(
"Instance");
900 b.Navigation(
"StartedBy");
903 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
905 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
906 .WithMany(
"OAuthConnections")
907 .HasForeignKey(
"UserId")
908 .OnDelete(DeleteBehavior.Cascade);
910 b.Navigation(
"User");
913 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
915 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
916 .WithOne(
"PermissionSet")
917 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"GroupId")
918 .OnDelete(DeleteBehavior.Cascade);
920 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
921 .WithOne(
"PermissionSet")
922 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"UserId")
923 .OnDelete(DeleteBehavior.Cascade);
925 b.Navigation(
"Group");
927 b.Navigation(
"User");
930 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
932 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
934 .HasForeignKey(
"CompileJobId")
935 .OnDelete(DeleteBehavior.Cascade)
938 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"InitialCompileJob")
940 .HasForeignKey(
"InitialCompileJobId");
942 b.Navigation(
"CompileJob");
944 b.Navigation(
"InitialCompileJob");
947 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
949 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
950 .WithOne(
"RepositorySettings")
951 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
952 .OnDelete(DeleteBehavior.Cascade)
955 b.Navigation(
"Instance");
958 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
960 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
961 .WithMany(
"ActiveTestMerges")
962 .HasForeignKey(
"RevisionInformationId")
963 .OnDelete(DeleteBehavior.Cascade)
966 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
967 .WithMany(
"RevisonInformations")
968 .HasForeignKey(
"TestMergeId")
969 .OnDelete(DeleteBehavior.ClientNoAction)
972 b.Navigation(
"RevisionInformation");
974 b.Navigation(
"TestMerge");
977 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
979 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
980 .WithMany(
"RevisionInformations")
981 .HasForeignKey(
"InstanceId")
982 .OnDelete(DeleteBehavior.Cascade)
985 b.Navigation(
"Instance");
988 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
990 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
991 .WithMany(
"TestMerges")
992 .HasForeignKey(
"MergedById")
993 .OnDelete(DeleteBehavior.Restrict)
996 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
997 .WithOne(
"PrimaryTestMerge")
998 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
999 .OnDelete(DeleteBehavior.Cascade)
1002 b.Navigation(
"MergedBy");
1004 b.Navigation(
"PrimaryRevisionInformation");
1007 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
1009 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
1010 .WithMany(
"CreatedUsers")
1011 .HasForeignKey(
"CreatedById");
1013 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
1015 .HasForeignKey(
"GroupId");
1017 b.Navigation(
"CreatedBy");
1019 b.Navigation(
"Group");
1022 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
1024 b.Navigation(
"Channels");
1027 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
1029 b.Navigation(
"ChatSettings");
1031 b.Navigation(
"DreamDaemonSettings");
1033 b.Navigation(
"DreamMakerSettings");
1035 b.Navigation(
"InstancePermissionSets");
1037 b.Navigation(
"Jobs");
1039 b.Navigation(
"RepositorySettings");
1041 b.Navigation(
"RevisionInformations");
1044 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
1046 b.Navigation(
"InstancePermissionSets");
1049 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
1051 b.Navigation(
"ActiveTestMerges");
1053 b.Navigation(
"CompileJobs");
1055 b.Navigation(
"PrimaryTestMerge");
1058 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
1060 b.Navigation(
"RevisonInformations");
1063 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
1065 b.Navigation(
"CreatedUsers");
1067 b.Navigation(
"OAuthConnections");
1069 b.Navigation(
"PermissionSet");
1071 b.Navigation(
"TestMerges");
1074 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
1076 b.Navigation(
"PermissionSet")
1079 b.Navigation(
"Users");
1081#pragma warning restore 612, 618