17#pragma warning disable 612, 618
19 .HasAnnotation(
"ProductVersion",
"8.0.0")
20 .HasAnnotation(
"Relational:MaxIdentifierLength", 64);
22 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
24 b.Property<
long?>(
"Id")
25 .ValueGeneratedOnAdd()
26 .HasColumnType(
"bigint");
28 b.Property<ushort?>(
"ChannelLimit")
30 .HasColumnType(
"smallint unsigned");
32 b.Property<
string>(
"ConnectionString")
35 .HasColumnType(
"longtext");
37 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"ConnectionString"),
"utf8mb4");
39 b.Property<
bool?>(
"Enabled")
40 .HasColumnType(
"tinyint(1)");
42 b.Property<
long>(
"InstanceId")
43 .HasColumnType(
"bigint");
45 b.Property<
string>(
"Name")
48 .HasColumnType(
"varchar(100)");
50 b.Property<
int>(
"Provider")
51 .HasColumnType(
"int");
53 b.Property<uint?>(
"ReconnectionInterval")
55 .HasColumnType(
"int unsigned");
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 b.Property<
long>(
"ChatSettingsId")
72 .HasColumnType(
"bigint");
74 b.Property<ulong?>(
"DiscordChannelId")
75 .HasColumnType(
"bigint unsigned");
77 b.Property<
string>(
"IrcChannel")
79 .HasColumnType(
"varchar(100)");
81 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"IrcChannel"),
"utf8mb4");
83 b.Property<
bool?>(
"IsAdminChannel")
85 .HasColumnType(
"tinyint(1)");
87 b.Property<
bool?>(
"IsSystemChannel")
89 .HasColumnType(
"tinyint(1)");
91 b.Property<
bool?>(
"IsUpdatesChannel")
93 .HasColumnType(
"tinyint(1)");
95 b.Property<
bool?>(
"IsWatchdogChannel")
97 .HasColumnType(
"tinyint(1)");
99 b.Property<
string>(
"Tag")
101 .HasColumnType(
"longtext");
103 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Tag"),
"utf8mb4");
107 b.HasIndex(
"ChatSettingsId",
"DiscordChannelId")
110 b.HasIndex(
"ChatSettingsId",
"IrcChannel")
113 b.ToTable(
"ChatChannels");
116 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
118 b.Property<
long?>(
"Id")
119 .ValueGeneratedOnAdd()
120 .HasColumnType(
"bigint");
122 b.Property<
int?>(
"DMApiMajorVersion")
123 .HasColumnType(
"int");
125 b.Property<
int?>(
"DMApiMinorVersion")
126 .HasColumnType(
"int");
128 b.Property<
int?>(
"DMApiPatchVersion")
129 .HasColumnType(
"int");
131 b.Property<Guid?>(
"DirectoryName")
133 .HasColumnType(
"char(36)");
135 b.Property<
string>(
"DmeName")
137 .HasColumnType(
"longtext");
139 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"DmeName"),
"utf8mb4");
141 b.Property<
string>(
"EngineVersion")
143 .HasColumnType(
"longtext");
145 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"EngineVersion"),
"utf8mb4");
147 b.Property<
int?>(
"GitHubDeploymentId")
148 .HasColumnType(
"int");
150 b.Property<
long?>(
"GitHubRepoId")
151 .HasColumnType(
"bigint");
153 b.Property<
long>(
"JobId")
154 .HasColumnType(
"bigint");
156 b.Property<
int?>(
"MinimumSecurityLevel")
157 .HasColumnType(
"int");
159 b.Property<
string>(
"Output")
161 .HasColumnType(
"longtext");
163 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Output"),
"utf8mb4");
165 b.Property<
string>(
"RepositoryOrigin")
166 .HasColumnType(
"longtext");
168 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"RepositoryOrigin"),
"utf8mb4");
170 b.Property<
long>(
"RevisionInformationId")
171 .HasColumnType(
"bigint");
175 b.HasIndex(
"DirectoryName");
180 b.HasIndex(
"RevisionInformationId");
182 b.ToTable(
"CompileJobs");
185 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
187 b.Property<
long>(
"Id")
188 .ValueGeneratedOnAdd()
189 .HasColumnType(
"bigint");
191 b.Property<
string>(
"AdditionalParameters")
194 .HasColumnType(
"longtext");
196 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"AdditionalParameters"),
"utf8mb4");
198 b.Property<
bool?>(
"AllowWebClient")
200 .HasColumnType(
"tinyint(1)");
202 b.Property<
bool?>(
"AutoStart")
204 .HasColumnType(
"tinyint(1)");
206 b.Property<
bool?>(
"DumpOnHealthCheckRestart")
208 .HasColumnType(
"tinyint(1)");
210 b.Property<uint?>(
"HealthCheckSeconds")
212 .HasColumnType(
"int unsigned");
214 b.Property<
long>(
"InstanceId")
215 .HasColumnType(
"bigint");
217 b.Property<
bool?>(
"LogOutput")
219 .HasColumnType(
"tinyint(1)");
221 b.Property<uint?>(
"MapThreads")
223 .HasColumnType(
"int unsigned");
225 b.Property<ushort?>(
"Port")
227 .HasColumnType(
"smallint unsigned");
229 b.Property<
int>(
"SecurityLevel")
230 .HasColumnType(
"int");
232 b.Property<
bool?>(
"StartProfiler")
234 .HasColumnType(
"tinyint(1)");
236 b.Property<uint?>(
"StartupTimeout")
238 .HasColumnType(
"int unsigned");
240 b.Property<uint?>(
"TopicRequestTimeout")
242 .HasColumnType(
"int unsigned");
244 b.Property<
int>(
"Visibility")
245 .HasColumnType(
"int");
249 b.HasIndex(
"InstanceId")
252 b.ToTable(
"DreamDaemonSettings");
255 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
257 b.Property<
long>(
"Id")
258 .ValueGeneratedOnAdd()
259 .HasColumnType(
"bigint");
261 b.Property<ushort?>(
"ApiValidationPort")
263 .HasColumnType(
"smallint unsigned");
265 b.Property<
int>(
"ApiValidationSecurityLevel")
266 .HasColumnType(
"int");
268 b.Property<
long>(
"InstanceId")
269 .HasColumnType(
"bigint");
271 b.Property<
string>(
"ProjectName")
273 .HasColumnType(
"longtext");
275 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"ProjectName"),
"utf8mb4");
277 b.Property<
bool?>(
"RequireDMApiValidation")
279 .HasColumnType(
"tinyint(1)");
281 b.Property<TimeSpan?>(
"Timeout")
283 .HasColumnType(
"time(6)");
287 b.HasIndex(
"InstanceId")
290 b.ToTable(
"DreamMakerSettings");
293 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
295 b.Property<
long?>(
"Id")
296 .ValueGeneratedOnAdd()
297 .HasColumnType(
"bigint");
299 b.Property<uint?>(
"AutoUpdateInterval")
301 .HasColumnType(
"int unsigned");
303 b.Property<ushort?>(
"ChatBotLimit")
305 .HasColumnType(
"smallint unsigned");
307 b.Property<
int>(
"ConfigurationType")
308 .HasColumnType(
"int");
310 b.Property<
string>(
"Name")
313 .HasColumnType(
"varchar(100)");
315 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Name"),
"utf8mb4");
317 b.Property<
bool?>(
"Online")
319 .HasColumnType(
"tinyint(1)");
321 b.Property<
string>(
"Path")
323 .HasColumnType(
"varchar(255)");
325 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Path"),
"utf8mb4");
327 b.Property<
string>(
"SwarmIdentifer")
328 .HasColumnType(
"varchar(255)");
330 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"SwarmIdentifer"),
"utf8mb4");
334 b.HasIndex(
"Path",
"SwarmIdentifer")
337 b.ToTable(
"Instances");
340 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
342 b.Property<
long>(
"Id")
343 .ValueGeneratedOnAdd()
344 .HasColumnType(
"bigint");
346 b.Property<ulong>(
"ChatBotRights")
347 .HasColumnType(
"bigint unsigned");
349 b.Property<ulong>(
"ConfigurationRights")
350 .HasColumnType(
"bigint unsigned");
352 b.Property<ulong>(
"DreamDaemonRights")
353 .HasColumnType(
"bigint unsigned");
355 b.Property<ulong>(
"DreamMakerRights")
356 .HasColumnType(
"bigint unsigned");
358 b.Property<ulong>(
"EngineRights")
359 .HasColumnType(
"bigint unsigned");
361 b.Property<
long>(
"InstanceId")
362 .HasColumnType(
"bigint");
364 b.Property<ulong>(
"InstancePermissionSetRights")
365 .HasColumnType(
"bigint unsigned");
367 b.Property<
long>(
"PermissionSetId")
368 .HasColumnType(
"bigint");
370 b.Property<ulong>(
"RepositoryRights")
371 .HasColumnType(
"bigint unsigned");
375 b.HasIndex(
"InstanceId");
377 b.HasIndex(
"PermissionSetId",
"InstanceId")
380 b.ToTable(
"InstancePermissionSets");
383 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
385 b.Property<
long?>(
"Id")
386 .ValueGeneratedOnAdd()
387 .HasColumnType(
"bigint");
389 b.Property<ulong?>(
"CancelRight")
390 .HasColumnType(
"bigint unsigned");
392 b.Property<ulong?>(
"CancelRightsType")
393 .HasColumnType(
"bigint unsigned");
395 b.Property<
bool?>(
"Cancelled")
397 .HasColumnType(
"tinyint(1)");
399 b.Property<
long?>(
"CancelledById")
400 .HasColumnType(
"bigint");
402 b.Property<
string>(
"Description")
404 .HasColumnType(
"longtext");
406 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Description"),
"utf8mb4");
408 b.Property<uint?>(
"ErrorCode")
409 .HasColumnType(
"int unsigned");
411 b.Property<
string>(
"ExceptionDetails")
412 .HasColumnType(
"longtext");
414 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"ExceptionDetails"),
"utf8mb4");
416 b.Property<
long>(
"InstanceId")
417 .HasColumnType(
"bigint");
419 b.Property<
byte>(
"JobCode")
420 .HasColumnType(
"tinyint unsigned");
422 b.Property<DateTimeOffset?>(
"StartedAt")
424 .HasColumnType(
"datetime(6)");
426 b.Property<
long>(
"StartedById")
427 .HasColumnType(
"bigint");
429 b.Property<DateTimeOffset?>(
"StoppedAt")
430 .HasColumnType(
"datetime(6)");
434 b.HasIndex(
"CancelledById");
436 b.HasIndex(
"InstanceId");
438 b.HasIndex(
"StartedById");
443 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
445 b.Property<
long>(
"Id")
446 .ValueGeneratedOnAdd()
447 .HasColumnType(
"bigint");
449 b.Property<
string>(
"ExternalUserId")
452 .HasColumnType(
"varchar(100)");
454 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"ExternalUserId"),
"utf8mb4");
456 b.Property<
int>(
"Provider")
457 .HasColumnType(
"int");
459 b.Property<
long?>(
"UserId")
460 .HasColumnType(
"bigint");
464 b.HasIndex(
"UserId");
466 b.HasIndex(
"Provider",
"ExternalUserId")
469 b.ToTable(
"OAuthConnections");
472 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
474 b.Property<
long?>(
"Id")
475 .ValueGeneratedOnAdd()
476 .HasColumnType(
"bigint");
478 b.Property<ulong>(
"AdministrationRights")
479 .HasColumnType(
"bigint unsigned");
481 b.Property<
long?>(
"GroupId")
482 .HasColumnType(
"bigint");
484 b.Property<ulong>(
"InstanceManagerRights")
485 .HasColumnType(
"bigint unsigned");
487 b.Property<
long?>(
"UserId")
488 .HasColumnType(
"bigint");
492 b.HasIndex(
"GroupId")
498 b.ToTable(
"PermissionSets");
501 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
503 b.Property<
long?>(
"Id")
504 .ValueGeneratedOnAdd()
505 .HasColumnType(
"bigint");
507 b.Property<
string>(
"AccessIdentifier")
509 .HasColumnType(
"longtext");
511 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"AccessIdentifier"),
"utf8mb4");
513 b.Property<
long>(
"CompileJobId")
514 .HasColumnType(
"bigint");
516 b.Property<
long?>(
"InitialCompileJobId")
517 .HasColumnType(
"bigint");
519 b.Property<
int>(
"LaunchSecurityLevel")
520 .HasColumnType(
"int");
522 b.Property<
int>(
"LaunchVisibility")
523 .HasColumnType(
"int");
525 b.Property<ushort>(
"Port")
526 .HasColumnType(
"smallint unsigned");
528 b.Property<
int>(
"ProcessId")
529 .HasColumnType(
"int");
531 b.Property<
int>(
"RebootState")
532 .HasColumnType(
"int");
534 b.Property<ushort?>(
"TopicPort")
535 .HasColumnType(
"smallint unsigned");
539 b.HasIndex(
"CompileJobId");
541 b.HasIndex(
"InitialCompileJobId");
543 b.ToTable(
"ReattachInformations");
546 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
548 b.Property<
long>(
"Id")
549 .ValueGeneratedOnAdd()
550 .HasColumnType(
"bigint");
552 b.Property<
string>(
"AccessToken")
554 .HasColumnType(
"longtext");
556 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"AccessToken"),
"utf8mb4");
558 b.Property<
string>(
"AccessUser")
560 .HasColumnType(
"longtext");
562 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"AccessUser"),
"utf8mb4");
564 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
566 .HasColumnType(
"tinyint(1)");
568 b.Property<
bool?>(
"AutoUpdatesSynchronize")
570 .HasColumnType(
"tinyint(1)");
572 b.Property<
string>(
"CommitterEmail")
575 .HasColumnType(
"longtext");
577 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"CommitterEmail"),
"utf8mb4");
579 b.Property<
string>(
"CommitterName")
582 .HasColumnType(
"longtext");
584 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"CommitterName"),
"utf8mb4");
586 b.Property<
bool?>(
"CreateGitHubDeployments")
588 .HasColumnType(
"tinyint(1)");
590 b.Property<
long>(
"InstanceId")
591 .HasColumnType(
"bigint");
593 b.Property<
bool?>(
"PostTestMergeComment")
595 .HasColumnType(
"tinyint(1)");
597 b.Property<
bool?>(
"PushTestMergeCommits")
599 .HasColumnType(
"tinyint(1)");
601 b.Property<
bool?>(
"ShowTestMergeCommitters")
603 .HasColumnType(
"tinyint(1)");
605 b.Property<
bool?>(
"UpdateSubmodules")
607 .HasColumnType(
"tinyint(1)");
611 b.HasIndex(
"InstanceId")
614 b.ToTable(
"RepositorySettings");
617 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
619 b.Property<
long>(
"Id")
620 .ValueGeneratedOnAdd()
621 .HasColumnType(
"bigint");
623 b.Property<
long>(
"RevisionInformationId")
624 .HasColumnType(
"bigint");
626 b.Property<
long>(
"TestMergeId")
627 .HasColumnType(
"bigint");
631 b.HasIndex(
"RevisionInformationId");
633 b.HasIndex(
"TestMergeId");
635 b.ToTable(
"RevInfoTestMerges");
638 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
640 b.Property<
long>(
"Id")
641 .ValueGeneratedOnAdd()
642 .HasColumnType(
"bigint");
644 b.Property<
string>(
"CommitSha")
647 .HasColumnType(
"varchar(40)");
649 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"CommitSha"),
"utf8mb4");
651 b.Property<
long>(
"InstanceId")
652 .HasColumnType(
"bigint");
654 b.Property<
string>(
"OriginCommitSha")
657 .HasColumnType(
"varchar(40)");
659 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"OriginCommitSha"),
"utf8mb4");
661 b.Property<DateTimeOffset>(
"Timestamp")
662 .HasColumnType(
"datetime(6)");
666 b.HasIndex(
"InstanceId",
"CommitSha")
669 b.ToTable(
"RevisionInformations");
672 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
674 b.Property<
long>(
"Id")
675 .ValueGeneratedOnAdd()
676 .HasColumnType(
"bigint");
678 b.Property<
string>(
"Author")
680 .HasColumnType(
"longtext");
682 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Author"),
"utf8mb4");
684 b.Property<
string>(
"BodyAtMerge")
686 .HasColumnType(
"longtext");
688 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"BodyAtMerge"),
"utf8mb4");
690 b.Property<
string>(
"Comment")
692 .HasColumnType(
"longtext");
694 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Comment"),
"utf8mb4");
696 b.Property<DateTimeOffset>(
"MergedAt")
697 .HasColumnType(
"datetime(6)");
699 b.Property<
long>(
"MergedById")
700 .HasColumnType(
"bigint");
702 b.Property<
int>(
"Number")
703 .HasColumnType(
"int");
705 b.Property<
long?>(
"PrimaryRevisionInformationId")
707 .HasColumnType(
"bigint");
709 b.Property<
string>(
"TargetCommitSha")
712 .HasColumnType(
"varchar(40)");
714 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"TargetCommitSha"),
"utf8mb4");
716 b.Property<
string>(
"TitleAtMerge")
718 .HasColumnType(
"longtext");
720 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"TitleAtMerge"),
"utf8mb4");
722 b.Property<
string>(
"Url")
724 .HasColumnType(
"longtext");
726 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Url"),
"utf8mb4");
730 b.HasIndex(
"MergedById");
732 b.HasIndex(
"PrimaryRevisionInformationId")
735 b.ToTable(
"TestMerges");
738 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
740 b.Property<
long?>(
"Id")
741 .ValueGeneratedOnAdd()
742 .HasColumnType(
"bigint");
744 b.Property<
string>(
"CanonicalName")
747 .HasColumnType(
"varchar(100)");
749 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"CanonicalName"),
"utf8mb4");
751 b.Property<DateTimeOffset?>(
"CreatedAt")
753 .HasColumnType(
"datetime(6)");
755 b.Property<
long?>(
"CreatedById")
756 .HasColumnType(
"bigint");
758 b.Property<
bool?>(
"Enabled")
760 .HasColumnType(
"tinyint(1)");
762 b.Property<
long?>(
"GroupId")
763 .HasColumnType(
"bigint");
765 b.Property<DateTimeOffset?>(
"LastPasswordUpdate")
766 .HasColumnType(
"datetime(6)");
768 b.Property<
string>(
"Name")
771 .HasColumnType(
"varchar(100)");
773 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Name"),
"utf8mb4");
775 b.Property<
string>(
"PasswordHash")
776 .HasColumnType(
"longtext");
778 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"PasswordHash"),
"utf8mb4");
780 b.Property<
string>(
"SystemIdentifier")
782 .HasColumnType(
"varchar(100)");
784 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"SystemIdentifier"),
"utf8mb4");
788 b.HasIndex(
"CanonicalName")
791 b.HasIndex(
"CreatedById");
793 b.HasIndex(
"GroupId");
795 b.HasIndex(
"SystemIdentifier")
801 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
803 b.Property<
long?>(
"Id")
804 .ValueGeneratedOnAdd()
805 .HasColumnType(
"bigint");
807 b.Property<
string>(
"Name")
810 .HasColumnType(
"varchar(100)");
812 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Name"),
"utf8mb4");
822 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
824 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
825 .WithMany(
"ChatSettings")
826 .HasForeignKey(
"InstanceId")
827 .OnDelete(DeleteBehavior.Cascade)
830 b.Navigation(
"Instance");
833 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
835 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
836 .WithMany(
"Channels")
837 .HasForeignKey(
"ChatSettingsId")
838 .OnDelete(DeleteBehavior.Cascade)
841 b.Navigation(
"ChatSettings");
844 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
846 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
848 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
849 .OnDelete(DeleteBehavior.Cascade)
852 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
853 .WithMany(
"CompileJobs")
854 .HasForeignKey(
"RevisionInformationId")
855 .OnDelete(DeleteBehavior.Cascade)
860 b.Navigation(
"RevisionInformation");
863 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
865 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
866 .WithOne(
"DreamDaemonSettings")
867 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
868 .OnDelete(DeleteBehavior.Cascade)
871 b.Navigation(
"Instance");
874 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
876 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
877 .WithOne(
"DreamMakerSettings")
878 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
879 .OnDelete(DeleteBehavior.Cascade)
882 b.Navigation(
"Instance");
885 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
887 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
888 .WithMany(
"InstancePermissionSets")
889 .HasForeignKey(
"InstanceId")
890 .OnDelete(DeleteBehavior.Cascade)
893 b.HasOne(
"Tgstation.Server.Host.Models.PermissionSet",
"PermissionSet")
894 .WithMany(
"InstancePermissionSets")
895 .HasForeignKey(
"PermissionSetId")
896 .OnDelete(DeleteBehavior.Cascade)
899 b.Navigation(
"Instance");
901 b.Navigation(
"PermissionSet");
904 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
906 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
908 .HasForeignKey(
"CancelledById");
910 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
912 .HasForeignKey(
"InstanceId")
913 .OnDelete(DeleteBehavior.Cascade)
916 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
918 .HasForeignKey(
"StartedById")
919 .OnDelete(DeleteBehavior.Cascade)
922 b.Navigation(
"CancelledBy");
924 b.Navigation(
"Instance");
926 b.Navigation(
"StartedBy");
929 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
931 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
932 .WithMany(
"OAuthConnections")
933 .HasForeignKey(
"UserId")
934 .OnDelete(DeleteBehavior.Cascade);
936 b.Navigation(
"User");
939 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
941 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
942 .WithOne(
"PermissionSet")
943 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"GroupId")
944 .OnDelete(DeleteBehavior.Cascade);
946 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
947 .WithOne(
"PermissionSet")
948 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"UserId")
949 .OnDelete(DeleteBehavior.Cascade);
951 b.Navigation(
"Group");
953 b.Navigation(
"User");
956 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
958 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
960 .HasForeignKey(
"CompileJobId")
961 .OnDelete(DeleteBehavior.Cascade)
964 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"InitialCompileJob")
966 .HasForeignKey(
"InitialCompileJobId");
968 b.Navigation(
"CompileJob");
970 b.Navigation(
"InitialCompileJob");
973 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
975 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
976 .WithOne(
"RepositorySettings")
977 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
978 .OnDelete(DeleteBehavior.Cascade)
981 b.Navigation(
"Instance");
984 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
986 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
987 .WithMany(
"ActiveTestMerges")
988 .HasForeignKey(
"RevisionInformationId")
989 .OnDelete(DeleteBehavior.Cascade)
992 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
993 .WithMany(
"RevisonInformations")
994 .HasForeignKey(
"TestMergeId")
995 .OnDelete(DeleteBehavior.ClientNoAction)
998 b.Navigation(
"RevisionInformation");
1000 b.Navigation(
"TestMerge");
1003 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
1005 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
1006 .WithMany(
"RevisionInformations")
1007 .HasForeignKey(
"InstanceId")
1008 .OnDelete(DeleteBehavior.Cascade)
1011 b.Navigation(
"Instance");
1014 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
1016 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
1017 .WithMany(
"TestMerges")
1018 .HasForeignKey(
"MergedById")
1019 .OnDelete(DeleteBehavior.Restrict)
1022 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
1023 .WithOne(
"PrimaryTestMerge")
1024 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
1025 .OnDelete(DeleteBehavior.Cascade)
1028 b.Navigation(
"MergedBy");
1030 b.Navigation(
"PrimaryRevisionInformation");
1033 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
1035 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
1036 .WithMany(
"CreatedUsers")
1037 .HasForeignKey(
"CreatedById");
1039 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
1041 .HasForeignKey(
"GroupId");
1043 b.Navigation(
"CreatedBy");
1045 b.Navigation(
"Group");
1048 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
1050 b.Navigation(
"Channels");
1053 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
1055 b.Navigation(
"ChatSettings");
1057 b.Navigation(
"DreamDaemonSettings");
1059 b.Navigation(
"DreamMakerSettings");
1061 b.Navigation(
"InstancePermissionSets");
1063 b.Navigation(
"Jobs");
1065 b.Navigation(
"RepositorySettings");
1067 b.Navigation(
"RevisionInformations");
1070 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
1072 b.Navigation(
"InstancePermissionSets");
1075 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
1077 b.Navigation(
"ActiveTestMerges");
1079 b.Navigation(
"CompileJobs");
1081 b.Navigation(
"PrimaryTestMerge");
1084 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
1086 b.Navigation(
"RevisonInformations");
1089 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
1091 b.Navigation(
"CreatedUsers");
1093 b.Navigation(
"OAuthConnections");
1095 b.Navigation(
"PermissionSet");
1097 b.Navigation(
"TestMerges");
1100 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
1102 b.Navigation(
"PermissionSet")
1105 b.Navigation(
"Users");
1107#pragma warning restore 612, 618