17#pragma warning disable 612, 618
19 .HasAnnotation(
"ProductVersion",
"6.0.16")
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<
string>(
"ByondVersion")
124 .HasColumnType(
"longtext");
126 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"ByondVersion"),
"utf8mb4");
128 b.Property<
int?>(
"DMApiMajorVersion")
129 .HasColumnType(
"int");
131 b.Property<
int?>(
"DMApiMinorVersion")
132 .HasColumnType(
"int");
134 b.Property<
int?>(
"DMApiPatchVersion")
135 .HasColumnType(
"int");
137 b.Property<Guid?>(
"DirectoryName")
139 .HasColumnType(
"char(36)");
141 b.Property<
string>(
"DmeName")
143 .HasColumnType(
"longtext");
145 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"DmeName"),
"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?>(
"DumpOnHeartbeatRestart")
208 .HasColumnType(
"tinyint(1)");
210 b.Property<uint?>(
"HeartbeatSeconds")
212 .HasColumnType(
"int unsigned");
214 b.Property<
long>(
"InstanceId")
215 .HasColumnType(
"bigint");
217 b.Property<
bool?>(
"LogOutput")
219 .HasColumnType(
"tinyint(1)");
221 b.Property<ushort?>(
"Port")
223 .HasColumnType(
"smallint unsigned");
225 b.Property<
int>(
"SecurityLevel")
226 .HasColumnType(
"int");
228 b.Property<
bool?>(
"StartProfiler")
230 .HasColumnType(
"tinyint(1)");
232 b.Property<uint?>(
"StartupTimeout")
234 .HasColumnType(
"int unsigned");
236 b.Property<uint?>(
"TopicRequestTimeout")
238 .HasColumnType(
"int unsigned");
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 b.Property<ushort?>(
"ApiValidationPort")
259 .HasColumnType(
"smallint unsigned");
261 b.Property<
int>(
"ApiValidationSecurityLevel")
262 .HasColumnType(
"int");
264 b.Property<
long>(
"InstanceId")
265 .HasColumnType(
"bigint");
267 b.Property<
string>(
"ProjectName")
269 .HasColumnType(
"longtext");
271 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"ProjectName"),
"utf8mb4");
273 b.Property<
bool?>(
"RequireDMApiValidation")
275 .HasColumnType(
"tinyint(1)");
277 b.Property<TimeSpan?>(
"Timeout")
279 .HasColumnType(
"time(6)");
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 b.Property<uint?>(
"AutoUpdateInterval")
297 .HasColumnType(
"int unsigned");
299 b.Property<ushort?>(
"ChatBotLimit")
301 .HasColumnType(
"smallint unsigned");
303 b.Property<
int>(
"ConfigurationType")
304 .HasColumnType(
"int");
306 b.Property<
string>(
"Name")
309 .HasColumnType(
"varchar(100)");
311 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Name"),
"utf8mb4");
313 b.Property<
bool?>(
"Online")
315 .HasColumnType(
"tinyint(1)");
317 b.Property<
string>(
"Path")
319 .HasColumnType(
"varchar(255)");
321 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Path"),
"utf8mb4");
323 b.Property<
string>(
"SwarmIdentifer")
324 .HasColumnType(
"varchar(255)");
326 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"SwarmIdentifer"),
"utf8mb4");
330 b.HasIndex(
"Path",
"SwarmIdentifer")
333 b.ToTable(
"Instances");
336 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
338 b.Property<
long>(
"Id")
339 .ValueGeneratedOnAdd()
340 .HasColumnType(
"bigint");
342 b.Property<ulong>(
"ByondRights")
343 .HasColumnType(
"bigint unsigned");
345 b.Property<ulong>(
"ChatBotRights")
346 .HasColumnType(
"bigint unsigned");
348 b.Property<ulong>(
"ConfigurationRights")
349 .HasColumnType(
"bigint unsigned");
351 b.Property<ulong>(
"DreamDaemonRights")
352 .HasColumnType(
"bigint unsigned");
354 b.Property<ulong>(
"DreamMakerRights")
355 .HasColumnType(
"bigint unsigned");
357 b.Property<
long>(
"InstanceId")
358 .HasColumnType(
"bigint");
360 b.Property<ulong>(
"InstancePermissionSetRights")
361 .HasColumnType(
"bigint unsigned");
363 b.Property<
long>(
"PermissionSetId")
364 .HasColumnType(
"bigint");
366 b.Property<ulong>(
"RepositoryRights")
367 .HasColumnType(
"bigint unsigned");
371 b.HasIndex(
"InstanceId");
373 b.HasIndex(
"PermissionSetId",
"InstanceId")
376 b.ToTable(
"InstancePermissionSets");
379 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
381 b.Property<
long?>(
"Id")
382 .ValueGeneratedOnAdd()
383 .HasColumnType(
"bigint");
385 b.Property<ulong?>(
"CancelRight")
386 .HasColumnType(
"bigint unsigned");
388 b.Property<ulong?>(
"CancelRightsType")
389 .HasColumnType(
"bigint unsigned");
391 b.Property<
bool?>(
"Cancelled")
393 .HasColumnType(
"tinyint(1)");
395 b.Property<
long?>(
"CancelledById")
396 .HasColumnType(
"bigint");
398 b.Property<
string>(
"Description")
400 .HasColumnType(
"longtext");
402 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Description"),
"utf8mb4");
404 b.Property<uint?>(
"ErrorCode")
405 .HasColumnType(
"int unsigned");
407 b.Property<
string>(
"ExceptionDetails")
408 .HasColumnType(
"longtext");
410 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"ExceptionDetails"),
"utf8mb4");
412 b.Property<
long>(
"InstanceId")
413 .HasColumnType(
"bigint");
415 b.Property<DateTimeOffset?>(
"StartedAt")
417 .HasColumnType(
"datetime(6)");
419 b.Property<
long>(
"StartedById")
420 .HasColumnType(
"bigint");
422 b.Property<DateTimeOffset?>(
"StoppedAt")
423 .HasColumnType(
"datetime(6)");
427 b.HasIndex(
"CancelledById");
429 b.HasIndex(
"InstanceId");
431 b.HasIndex(
"StartedById");
436 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
438 b.Property<
long>(
"Id")
439 .ValueGeneratedOnAdd()
440 .HasColumnType(
"bigint");
442 b.Property<
string>(
"ExternalUserId")
445 .HasColumnType(
"varchar(100)");
447 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"ExternalUserId"),
"utf8mb4");
449 b.Property<
int>(
"Provider")
450 .HasColumnType(
"int");
452 b.Property<
long?>(
"UserId")
453 .HasColumnType(
"bigint");
457 b.HasIndex(
"UserId");
459 b.HasIndex(
"Provider",
"ExternalUserId")
462 b.ToTable(
"OAuthConnections");
465 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
467 b.Property<
long?>(
"Id")
468 .ValueGeneratedOnAdd()
469 .HasColumnType(
"bigint");
471 b.Property<ulong>(
"AdministrationRights")
472 .HasColumnType(
"bigint unsigned");
474 b.Property<
long?>(
"GroupId")
475 .HasColumnType(
"bigint");
477 b.Property<ulong>(
"InstanceManagerRights")
478 .HasColumnType(
"bigint unsigned");
480 b.Property<
long?>(
"UserId")
481 .HasColumnType(
"bigint");
485 b.HasIndex(
"GroupId")
491 b.ToTable(
"PermissionSets");
494 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
496 b.Property<
long>(
"Id")
497 .ValueGeneratedOnAdd()
498 .HasColumnType(
"bigint");
500 b.Property<
string>(
"AccessIdentifier")
502 .HasColumnType(
"longtext");
504 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"AccessIdentifier"),
"utf8mb4");
506 b.Property<
long>(
"CompileJobId")
507 .HasColumnType(
"bigint");
509 b.Property<
long?>(
"InitialCompileJobId")
510 .HasColumnType(
"bigint");
512 b.Property<
int>(
"LaunchSecurityLevel")
513 .HasColumnType(
"int");
515 b.Property<
int>(
"LaunchVisibility")
516 .HasColumnType(
"int");
518 b.Property<ushort>(
"Port")
519 .HasColumnType(
"smallint unsigned");
521 b.Property<
int>(
"ProcessId")
522 .HasColumnType(
"int");
524 b.Property<
int>(
"RebootState")
525 .HasColumnType(
"int");
529 b.HasIndex(
"CompileJobId");
531 b.HasIndex(
"InitialCompileJobId");
533 b.ToTable(
"ReattachInformations");
536 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
538 b.Property<
long>(
"Id")
539 .ValueGeneratedOnAdd()
540 .HasColumnType(
"bigint");
542 b.Property<
string>(
"AccessToken")
544 .HasColumnType(
"longtext");
546 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"AccessToken"),
"utf8mb4");
548 b.Property<
string>(
"AccessUser")
550 .HasColumnType(
"longtext");
552 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"AccessUser"),
"utf8mb4");
554 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
556 .HasColumnType(
"tinyint(1)");
558 b.Property<
bool?>(
"AutoUpdatesSynchronize")
560 .HasColumnType(
"tinyint(1)");
562 b.Property<
string>(
"CommitterEmail")
565 .HasColumnType(
"longtext");
567 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"CommitterEmail"),
"utf8mb4");
569 b.Property<
string>(
"CommitterName")
572 .HasColumnType(
"longtext");
574 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"CommitterName"),
"utf8mb4");
576 b.Property<
bool?>(
"CreateGitHubDeployments")
578 .HasColumnType(
"tinyint(1)");
580 b.Property<
long>(
"InstanceId")
581 .HasColumnType(
"bigint");
583 b.Property<
bool?>(
"PostTestMergeComment")
585 .HasColumnType(
"tinyint(1)");
587 b.Property<
bool?>(
"PushTestMergeCommits")
589 .HasColumnType(
"tinyint(1)");
591 b.Property<
bool?>(
"ShowTestMergeCommitters")
593 .HasColumnType(
"tinyint(1)");
595 b.Property<
bool?>(
"UpdateSubmodules")
597 .HasColumnType(
"tinyint(1)");
601 b.HasIndex(
"InstanceId")
604 b.ToTable(
"RepositorySettings");
607 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
609 b.Property<
long>(
"Id")
610 .ValueGeneratedOnAdd()
611 .HasColumnType(
"bigint");
613 b.Property<
long>(
"RevisionInformationId")
614 .HasColumnType(
"bigint");
616 b.Property<
long>(
"TestMergeId")
617 .HasColumnType(
"bigint");
621 b.HasIndex(
"RevisionInformationId");
623 b.HasIndex(
"TestMergeId");
625 b.ToTable(
"RevInfoTestMerges");
628 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
630 b.Property<
long>(
"Id")
631 .ValueGeneratedOnAdd()
632 .HasColumnType(
"bigint");
634 b.Property<
string>(
"CommitSha")
637 .HasColumnType(
"varchar(40)");
639 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"CommitSha"),
"utf8mb4");
641 b.Property<
long>(
"InstanceId")
642 .HasColumnType(
"bigint");
644 b.Property<
string>(
"OriginCommitSha")
647 .HasColumnType(
"varchar(40)");
649 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"OriginCommitSha"),
"utf8mb4");
651 b.Property<DateTimeOffset>(
"Timestamp")
652 .HasColumnType(
"datetime(6)");
656 b.HasIndex(
"InstanceId",
"CommitSha")
659 b.ToTable(
"RevisionInformations");
662 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
664 b.Property<
long>(
"Id")
665 .ValueGeneratedOnAdd()
666 .HasColumnType(
"bigint");
668 b.Property<
string>(
"Author")
670 .HasColumnType(
"longtext");
672 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Author"),
"utf8mb4");
674 b.Property<
string>(
"BodyAtMerge")
676 .HasColumnType(
"longtext");
678 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"BodyAtMerge"),
"utf8mb4");
680 b.Property<
string>(
"Comment")
682 .HasColumnType(
"longtext");
684 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Comment"),
"utf8mb4");
686 b.Property<DateTimeOffset>(
"MergedAt")
687 .HasColumnType(
"datetime(6)");
689 b.Property<
long>(
"MergedById")
690 .HasColumnType(
"bigint");
692 b.Property<
int>(
"Number")
693 .HasColumnType(
"int");
695 b.Property<
long?>(
"PrimaryRevisionInformationId")
697 .HasColumnType(
"bigint");
699 b.Property<
string>(
"TargetCommitSha")
702 .HasColumnType(
"varchar(40)");
704 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"TargetCommitSha"),
"utf8mb4");
706 b.Property<
string>(
"TitleAtMerge")
708 .HasColumnType(
"longtext");
710 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"TitleAtMerge"),
"utf8mb4");
712 b.Property<
string>(
"Url")
714 .HasColumnType(
"longtext");
716 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Url"),
"utf8mb4");
720 b.HasIndex(
"MergedById");
722 b.HasIndex(
"PrimaryRevisionInformationId")
725 b.ToTable(
"TestMerges");
728 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
730 b.Property<
long?>(
"Id")
731 .ValueGeneratedOnAdd()
732 .HasColumnType(
"bigint");
734 b.Property<
string>(
"CanonicalName")
737 .HasColumnType(
"varchar(100)");
739 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"CanonicalName"),
"utf8mb4");
741 b.Property<DateTimeOffset?>(
"CreatedAt")
743 .HasColumnType(
"datetime(6)");
745 b.Property<
long?>(
"CreatedById")
746 .HasColumnType(
"bigint");
748 b.Property<
bool?>(
"Enabled")
750 .HasColumnType(
"tinyint(1)");
752 b.Property<
long?>(
"GroupId")
753 .HasColumnType(
"bigint");
755 b.Property<DateTimeOffset?>(
"LastPasswordUpdate")
756 .HasColumnType(
"datetime(6)");
758 b.Property<
string>(
"Name")
761 .HasColumnType(
"varchar(100)");
763 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Name"),
"utf8mb4");
765 b.Property<
string>(
"PasswordHash")
766 .HasColumnType(
"longtext");
768 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"PasswordHash"),
"utf8mb4");
770 b.Property<
string>(
"SystemIdentifier")
772 .HasColumnType(
"varchar(100)");
774 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"SystemIdentifier"),
"utf8mb4");
778 b.HasIndex(
"CanonicalName")
781 b.HasIndex(
"CreatedById");
783 b.HasIndex(
"GroupId");
785 b.HasIndex(
"SystemIdentifier")
791 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
793 b.Property<
long?>(
"Id")
794 .ValueGeneratedOnAdd()
795 .HasColumnType(
"bigint");
797 b.Property<
string>(
"Name")
800 .HasColumnType(
"varchar(100)");
802 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Name"),
"utf8mb4");
812 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
814 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
815 .WithMany(
"ChatSettings")
816 .HasForeignKey(
"InstanceId")
817 .OnDelete(DeleteBehavior.Cascade)
820 b.Navigation(
"Instance");
823 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
825 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
826 .WithMany(
"Channels")
827 .HasForeignKey(
"ChatSettingsId")
828 .OnDelete(DeleteBehavior.Cascade)
831 b.Navigation(
"ChatSettings");
834 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
836 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
838 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
839 .OnDelete(DeleteBehavior.Cascade)
842 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
843 .WithMany(
"CompileJobs")
844 .HasForeignKey(
"RevisionInformationId")
845 .OnDelete(DeleteBehavior.Cascade)
850 b.Navigation(
"RevisionInformation");
853 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
855 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
856 .WithOne(
"DreamDaemonSettings")
857 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
858 .OnDelete(DeleteBehavior.Cascade)
861 b.Navigation(
"Instance");
864 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
866 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
867 .WithOne(
"DreamMakerSettings")
868 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
869 .OnDelete(DeleteBehavior.Cascade)
872 b.Navigation(
"Instance");
875 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
877 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
878 .WithMany(
"InstancePermissionSets")
879 .HasForeignKey(
"InstanceId")
880 .OnDelete(DeleteBehavior.Cascade)
883 b.HasOne(
"Tgstation.Server.Host.Models.PermissionSet",
"PermissionSet")
884 .WithMany(
"InstancePermissionSets")
885 .HasForeignKey(
"PermissionSetId")
886 .OnDelete(DeleteBehavior.Cascade)
889 b.Navigation(
"Instance");
891 b.Navigation(
"PermissionSet");
894 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
896 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
898 .HasForeignKey(
"CancelledById");
900 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
902 .HasForeignKey(
"InstanceId")
903 .OnDelete(DeleteBehavior.Cascade)
906 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
908 .HasForeignKey(
"StartedById")
909 .OnDelete(DeleteBehavior.Cascade)
912 b.Navigation(
"CancelledBy");
914 b.Navigation(
"Instance");
916 b.Navigation(
"StartedBy");
919 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
921 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
922 .WithMany(
"OAuthConnections")
923 .HasForeignKey(
"UserId")
924 .OnDelete(DeleteBehavior.Cascade);
926 b.Navigation(
"User");
929 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
931 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
932 .WithOne(
"PermissionSet")
933 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"GroupId")
934 .OnDelete(DeleteBehavior.Cascade);
936 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
937 .WithOne(
"PermissionSet")
938 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"UserId")
939 .OnDelete(DeleteBehavior.Cascade);
941 b.Navigation(
"Group");
943 b.Navigation(
"User");
946 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
948 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
950 .HasForeignKey(
"CompileJobId")
951 .OnDelete(DeleteBehavior.Cascade)
954 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"InitialCompileJob")
956 .HasForeignKey(
"InitialCompileJobId");
958 b.Navigation(
"CompileJob");
960 b.Navigation(
"InitialCompileJob");
963 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
965 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
966 .WithOne(
"RepositorySettings")
967 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
968 .OnDelete(DeleteBehavior.Cascade)
971 b.Navigation(
"Instance");
974 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
976 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
977 .WithMany(
"ActiveTestMerges")
978 .HasForeignKey(
"RevisionInformationId")
979 .OnDelete(DeleteBehavior.Cascade)
982 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
983 .WithMany(
"RevisonInformations")
984 .HasForeignKey(
"TestMergeId")
985 .OnDelete(DeleteBehavior.ClientNoAction)
988 b.Navigation(
"RevisionInformation");
990 b.Navigation(
"TestMerge");
993 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
995 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
996 .WithMany(
"RevisionInformations")
997 .HasForeignKey(
"InstanceId")
998 .OnDelete(DeleteBehavior.Cascade)
1001 b.Navigation(
"Instance");
1004 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
1006 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
1007 .WithMany(
"TestMerges")
1008 .HasForeignKey(
"MergedById")
1009 .OnDelete(DeleteBehavior.Restrict)
1012 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
1013 .WithOne(
"PrimaryTestMerge")
1014 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
1015 .OnDelete(DeleteBehavior.Cascade)
1018 b.Navigation(
"MergedBy");
1020 b.Navigation(
"PrimaryRevisionInformation");
1023 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
1025 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
1026 .WithMany(
"CreatedUsers")
1027 .HasForeignKey(
"CreatedById");
1029 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
1031 .HasForeignKey(
"GroupId");
1033 b.Navigation(
"CreatedBy");
1035 b.Navigation(
"Group");
1038 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
1040 b.Navigation(
"Channels");
1043 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
1045 b.Navigation(
"ChatSettings");
1047 b.Navigation(
"DreamDaemonSettings");
1049 b.Navigation(
"DreamMakerSettings");
1051 b.Navigation(
"InstancePermissionSets");
1053 b.Navigation(
"Jobs");
1055 b.Navigation(
"RepositorySettings");
1057 b.Navigation(
"RevisionInformations");
1060 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
1062 b.Navigation(
"InstancePermissionSets");
1065 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
1067 b.Navigation(
"ActiveTestMerges");
1069 b.Navigation(
"CompileJobs");
1071 b.Navigation(
"PrimaryTestMerge");
1074 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
1076 b.Navigation(
"RevisonInformations");
1079 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
1081 b.Navigation(
"CreatedUsers");
1083 b.Navigation(
"OAuthConnections");
1085 b.Navigation(
"PermissionSet");
1087 b.Navigation(
"TestMerges");
1090 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
1092 b.Navigation(
"PermissionSet")
1095 b.Navigation(
"Users");
1097#pragma warning restore 612, 618