17#pragma warning disable 612, 618
19 .HasAnnotation(
"ProductVersion",
"6.0.15")
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?>(
"IsUpdatesChannel")
89 .HasColumnType(
"tinyint(1)");
91 b.Property<
bool?>(
"IsWatchdogChannel")
93 .HasColumnType(
"tinyint(1)");
95 b.Property<
string>(
"Tag")
97 .HasColumnType(
"longtext");
99 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Tag"),
"utf8mb4");
103 b.HasIndex(
"ChatSettingsId",
"DiscordChannelId")
106 b.HasIndex(
"ChatSettingsId",
"IrcChannel")
109 b.ToTable(
"ChatChannels");
112 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
114 b.Property<
long?>(
"Id")
115 .ValueGeneratedOnAdd()
116 .HasColumnType(
"bigint");
118 b.Property<
string>(
"ByondVersion")
120 .HasColumnType(
"longtext");
122 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"ByondVersion"),
"utf8mb4");
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(
"char(36)");
137 b.Property<
string>(
"DmeName")
139 .HasColumnType(
"longtext");
141 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"DmeName"),
"utf8mb4");
143 b.Property<
int?>(
"GitHubDeploymentId")
144 .HasColumnType(
"int");
146 b.Property<
long?>(
"GitHubRepoId")
147 .HasColumnType(
"bigint");
149 b.Property<
long>(
"JobId")
150 .HasColumnType(
"bigint");
152 b.Property<
int?>(
"MinimumSecurityLevel")
153 .HasColumnType(
"int");
155 b.Property<
string>(
"Output")
157 .HasColumnType(
"longtext");
159 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Output"),
"utf8mb4");
161 b.Property<
string>(
"RepositoryOrigin")
162 .HasColumnType(
"longtext");
164 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"RepositoryOrigin"),
"utf8mb4");
166 b.Property<
long>(
"RevisionInformationId")
167 .HasColumnType(
"bigint");
171 b.HasIndex(
"DirectoryName");
176 b.HasIndex(
"RevisionInformationId");
178 b.ToTable(
"CompileJobs");
181 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
183 b.Property<
long>(
"Id")
184 .ValueGeneratedOnAdd()
185 .HasColumnType(
"bigint");
187 b.Property<
string>(
"AdditionalParameters")
190 .HasColumnType(
"longtext");
192 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"AdditionalParameters"),
"utf8mb4");
194 b.Property<
bool?>(
"AllowWebClient")
196 .HasColumnType(
"tinyint(1)");
198 b.Property<
bool?>(
"AutoStart")
200 .HasColumnType(
"tinyint(1)");
202 b.Property<
bool?>(
"DumpOnHeartbeatRestart")
204 .HasColumnType(
"tinyint(1)");
206 b.Property<uint?>(
"HeartbeatSeconds")
208 .HasColumnType(
"int unsigned");
210 b.Property<
long>(
"InstanceId")
211 .HasColumnType(
"bigint");
213 b.Property<
bool?>(
"LogOutput")
215 .HasColumnType(
"tinyint(1)");
217 b.Property<ushort?>(
"Port")
219 .HasColumnType(
"smallint unsigned");
221 b.Property<
int>(
"SecurityLevel")
222 .HasColumnType(
"int");
224 b.Property<
bool?>(
"StartProfiler")
226 .HasColumnType(
"tinyint(1)");
228 b.Property<uint?>(
"StartupTimeout")
230 .HasColumnType(
"int unsigned");
232 b.Property<uint?>(
"TopicRequestTimeout")
234 .HasColumnType(
"int unsigned");
236 b.Property<
int>(
"Visibility")
237 .HasColumnType(
"int");
241 b.HasIndex(
"InstanceId")
244 b.ToTable(
"DreamDaemonSettings");
247 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
249 b.Property<
long>(
"Id")
250 .ValueGeneratedOnAdd()
251 .HasColumnType(
"bigint");
253 b.Property<ushort?>(
"ApiValidationPort")
255 .HasColumnType(
"smallint unsigned");
257 b.Property<
int>(
"ApiValidationSecurityLevel")
258 .HasColumnType(
"int");
260 b.Property<
long>(
"InstanceId")
261 .HasColumnType(
"bigint");
263 b.Property<
string>(
"ProjectName")
265 .HasColumnType(
"longtext");
267 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"ProjectName"),
"utf8mb4");
269 b.Property<
bool?>(
"RequireDMApiValidation")
271 .HasColumnType(
"tinyint(1)");
273 b.Property<TimeSpan?>(
"Timeout")
275 .HasColumnType(
"time(6)");
279 b.HasIndex(
"InstanceId")
282 b.ToTable(
"DreamMakerSettings");
285 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
287 b.Property<
long?>(
"Id")
288 .ValueGeneratedOnAdd()
289 .HasColumnType(
"bigint");
291 b.Property<uint?>(
"AutoUpdateInterval")
293 .HasColumnType(
"int unsigned");
295 b.Property<ushort?>(
"ChatBotLimit")
297 .HasColumnType(
"smallint unsigned");
299 b.Property<
int>(
"ConfigurationType")
300 .HasColumnType(
"int");
302 b.Property<
string>(
"Name")
305 .HasColumnType(
"varchar(100)");
307 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Name"),
"utf8mb4");
309 b.Property<
bool?>(
"Online")
311 .HasColumnType(
"tinyint(1)");
313 b.Property<
string>(
"Path")
315 .HasColumnType(
"varchar(255)");
317 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Path"),
"utf8mb4");
319 b.Property<
string>(
"SwarmIdentifer")
320 .HasColumnType(
"varchar(255)");
322 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"SwarmIdentifer"),
"utf8mb4");
326 b.HasIndex(
"Path",
"SwarmIdentifer")
329 b.ToTable(
"Instances");
332 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
334 b.Property<
long>(
"Id")
335 .ValueGeneratedOnAdd()
336 .HasColumnType(
"bigint");
338 b.Property<ulong>(
"ByondRights")
339 .HasColumnType(
"bigint unsigned");
341 b.Property<ulong>(
"ChatBotRights")
342 .HasColumnType(
"bigint unsigned");
344 b.Property<ulong>(
"ConfigurationRights")
345 .HasColumnType(
"bigint unsigned");
347 b.Property<ulong>(
"DreamDaemonRights")
348 .HasColumnType(
"bigint unsigned");
350 b.Property<ulong>(
"DreamMakerRights")
351 .HasColumnType(
"bigint unsigned");
353 b.Property<
long>(
"InstanceId")
354 .HasColumnType(
"bigint");
356 b.Property<ulong>(
"InstancePermissionSetRights")
357 .HasColumnType(
"bigint unsigned");
359 b.Property<
long>(
"PermissionSetId")
360 .HasColumnType(
"bigint");
362 b.Property<ulong>(
"RepositoryRights")
363 .HasColumnType(
"bigint unsigned");
367 b.HasIndex(
"InstanceId");
369 b.HasIndex(
"PermissionSetId",
"InstanceId")
372 b.ToTable(
"InstancePermissionSets");
375 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
377 b.Property<
long?>(
"Id")
378 .ValueGeneratedOnAdd()
379 .HasColumnType(
"bigint");
381 b.Property<ulong?>(
"CancelRight")
382 .HasColumnType(
"bigint unsigned");
384 b.Property<ulong?>(
"CancelRightsType")
385 .HasColumnType(
"bigint unsigned");
387 b.Property<
bool?>(
"Cancelled")
389 .HasColumnType(
"tinyint(1)");
391 b.Property<
long?>(
"CancelledById")
392 .HasColumnType(
"bigint");
394 b.Property<
string>(
"Description")
396 .HasColumnType(
"longtext");
398 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Description"),
"utf8mb4");
400 b.Property<uint?>(
"ErrorCode")
401 .HasColumnType(
"int unsigned");
403 b.Property<
string>(
"ExceptionDetails")
404 .HasColumnType(
"longtext");
406 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"ExceptionDetails"),
"utf8mb4");
408 b.Property<
long>(
"InstanceId")
409 .HasColumnType(
"bigint");
411 b.Property<DateTimeOffset?>(
"StartedAt")
413 .HasColumnType(
"datetime(6)");
415 b.Property<
long>(
"StartedById")
416 .HasColumnType(
"bigint");
418 b.Property<DateTimeOffset?>(
"StoppedAt")
419 .HasColumnType(
"datetime(6)");
423 b.HasIndex(
"CancelledById");
425 b.HasIndex(
"InstanceId");
427 b.HasIndex(
"StartedById");
432 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
434 b.Property<
long>(
"Id")
435 .ValueGeneratedOnAdd()
436 .HasColumnType(
"bigint");
438 b.Property<
string>(
"ExternalUserId")
441 .HasColumnType(
"varchar(100)");
443 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"ExternalUserId"),
"utf8mb4");
445 b.Property<
int>(
"Provider")
446 .HasColumnType(
"int");
448 b.Property<
long?>(
"UserId")
449 .HasColumnType(
"bigint");
453 b.HasIndex(
"UserId");
455 b.HasIndex(
"Provider",
"ExternalUserId")
458 b.ToTable(
"OAuthConnections");
461 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
463 b.Property<
long?>(
"Id")
464 .ValueGeneratedOnAdd()
465 .HasColumnType(
"bigint");
467 b.Property<ulong>(
"AdministrationRights")
468 .HasColumnType(
"bigint unsigned");
470 b.Property<
long?>(
"GroupId")
471 .HasColumnType(
"bigint");
473 b.Property<ulong>(
"InstanceManagerRights")
474 .HasColumnType(
"bigint unsigned");
476 b.Property<
long?>(
"UserId")
477 .HasColumnType(
"bigint");
481 b.HasIndex(
"GroupId")
487 b.ToTable(
"PermissionSets");
490 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
492 b.Property<
long>(
"Id")
493 .ValueGeneratedOnAdd()
494 .HasColumnType(
"bigint");
496 b.Property<
string>(
"AccessIdentifier")
498 .HasColumnType(
"longtext");
500 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"AccessIdentifier"),
"utf8mb4");
502 b.Property<
long>(
"CompileJobId")
503 .HasColumnType(
"bigint");
505 b.Property<
int>(
"LaunchSecurityLevel")
506 .HasColumnType(
"int");
508 b.Property<
int>(
"LaunchVisibility")
509 .HasColumnType(
"int");
511 b.Property<ushort>(
"Port")
512 .HasColumnType(
"smallint unsigned");
514 b.Property<
int>(
"ProcessId")
515 .HasColumnType(
"int");
517 b.Property<
int>(
"RebootState")
518 .HasColumnType(
"int");
522 b.HasIndex(
"CompileJobId");
524 b.ToTable(
"ReattachInformations");
527 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
529 b.Property<
long>(
"Id")
530 .ValueGeneratedOnAdd()
531 .HasColumnType(
"bigint");
533 b.Property<
string>(
"AccessToken")
535 .HasColumnType(
"longtext");
537 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"AccessToken"),
"utf8mb4");
539 b.Property<
string>(
"AccessUser")
541 .HasColumnType(
"longtext");
543 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"AccessUser"),
"utf8mb4");
545 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
547 .HasColumnType(
"tinyint(1)");
549 b.Property<
bool?>(
"AutoUpdatesSynchronize")
551 .HasColumnType(
"tinyint(1)");
553 b.Property<
string>(
"CommitterEmail")
556 .HasColumnType(
"longtext");
558 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"CommitterEmail"),
"utf8mb4");
560 b.Property<
string>(
"CommitterName")
563 .HasColumnType(
"longtext");
565 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"CommitterName"),
"utf8mb4");
567 b.Property<
bool?>(
"CreateGitHubDeployments")
569 .HasColumnType(
"tinyint(1)");
571 b.Property<
long>(
"InstanceId")
572 .HasColumnType(
"bigint");
574 b.Property<
bool?>(
"PostTestMergeComment")
576 .HasColumnType(
"tinyint(1)");
578 b.Property<
bool?>(
"PushTestMergeCommits")
580 .HasColumnType(
"tinyint(1)");
582 b.Property<
bool?>(
"ShowTestMergeCommitters")
584 .HasColumnType(
"tinyint(1)");
586 b.Property<
bool?>(
"UpdateSubmodules")
588 .HasColumnType(
"tinyint(1)");
592 b.HasIndex(
"InstanceId")
595 b.ToTable(
"RepositorySettings");
598 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
600 b.Property<
long>(
"Id")
601 .ValueGeneratedOnAdd()
602 .HasColumnType(
"bigint");
604 b.Property<
long>(
"RevisionInformationId")
605 .HasColumnType(
"bigint");
607 b.Property<
long>(
"TestMergeId")
608 .HasColumnType(
"bigint");
612 b.HasIndex(
"RevisionInformationId");
614 b.HasIndex(
"TestMergeId");
616 b.ToTable(
"RevInfoTestMerges");
619 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
621 b.Property<
long>(
"Id")
622 .ValueGeneratedOnAdd()
623 .HasColumnType(
"bigint");
625 b.Property<
string>(
"CommitSha")
628 .HasColumnType(
"varchar(40)");
630 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"CommitSha"),
"utf8mb4");
632 b.Property<
long>(
"InstanceId")
633 .HasColumnType(
"bigint");
635 b.Property<
string>(
"OriginCommitSha")
638 .HasColumnType(
"varchar(40)");
640 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"OriginCommitSha"),
"utf8mb4");
642 b.Property<DateTimeOffset>(
"Timestamp")
643 .HasColumnType(
"datetime(6)");
647 b.HasIndex(
"InstanceId",
"CommitSha")
650 b.ToTable(
"RevisionInformations");
653 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
655 b.Property<
long>(
"Id")
656 .ValueGeneratedOnAdd()
657 .HasColumnType(
"bigint");
659 b.Property<
string>(
"Author")
661 .HasColumnType(
"longtext");
663 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Author"),
"utf8mb4");
665 b.Property<
string>(
"BodyAtMerge")
667 .HasColumnType(
"longtext");
669 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"BodyAtMerge"),
"utf8mb4");
671 b.Property<
string>(
"Comment")
673 .HasColumnType(
"longtext");
675 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Comment"),
"utf8mb4");
677 b.Property<DateTimeOffset>(
"MergedAt")
678 .HasColumnType(
"datetime(6)");
680 b.Property<
long>(
"MergedById")
681 .HasColumnType(
"bigint");
683 b.Property<
int>(
"Number")
684 .HasColumnType(
"int");
686 b.Property<
long?>(
"PrimaryRevisionInformationId")
688 .HasColumnType(
"bigint");
690 b.Property<
string>(
"TargetCommitSha")
693 .HasColumnType(
"varchar(40)");
695 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"TargetCommitSha"),
"utf8mb4");
697 b.Property<
string>(
"TitleAtMerge")
699 .HasColumnType(
"longtext");
701 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"TitleAtMerge"),
"utf8mb4");
703 b.Property<
string>(
"Url")
705 .HasColumnType(
"longtext");
707 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Url"),
"utf8mb4");
711 b.HasIndex(
"MergedById");
713 b.HasIndex(
"PrimaryRevisionInformationId")
716 b.ToTable(
"TestMerges");
719 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
721 b.Property<
long?>(
"Id")
722 .ValueGeneratedOnAdd()
723 .HasColumnType(
"bigint");
725 b.Property<
string>(
"CanonicalName")
728 .HasColumnType(
"varchar(100)");
730 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"CanonicalName"),
"utf8mb4");
732 b.Property<DateTimeOffset?>(
"CreatedAt")
734 .HasColumnType(
"datetime(6)");
736 b.Property<
long?>(
"CreatedById")
737 .HasColumnType(
"bigint");
739 b.Property<
bool?>(
"Enabled")
741 .HasColumnType(
"tinyint(1)");
743 b.Property<
long?>(
"GroupId")
744 .HasColumnType(
"bigint");
746 b.Property<DateTimeOffset?>(
"LastPasswordUpdate")
747 .HasColumnType(
"datetime(6)");
749 b.Property<
string>(
"Name")
752 .HasColumnType(
"varchar(100)");
754 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Name"),
"utf8mb4");
756 b.Property<
string>(
"PasswordHash")
757 .HasColumnType(
"longtext");
759 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"PasswordHash"),
"utf8mb4");
761 b.Property<
string>(
"SystemIdentifier")
763 .HasColumnType(
"varchar(100)");
765 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"SystemIdentifier"),
"utf8mb4");
769 b.HasIndex(
"CanonicalName")
772 b.HasIndex(
"CreatedById");
774 b.HasIndex(
"GroupId");
776 b.HasIndex(
"SystemIdentifier")
782 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
784 b.Property<
long?>(
"Id")
785 .ValueGeneratedOnAdd()
786 .HasColumnType(
"bigint");
788 b.Property<
string>(
"Name")
791 .HasColumnType(
"varchar(100)");
793 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Name"),
"utf8mb4");
803 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
805 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
806 .WithMany(
"ChatSettings")
807 .HasForeignKey(
"InstanceId")
808 .OnDelete(DeleteBehavior.Cascade)
811 b.Navigation(
"Instance");
814 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
816 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
817 .WithMany(
"Channels")
818 .HasForeignKey(
"ChatSettingsId")
819 .OnDelete(DeleteBehavior.Cascade)
822 b.Navigation(
"ChatSettings");
825 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
827 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
829 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
830 .OnDelete(DeleteBehavior.Cascade)
833 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
834 .WithMany(
"CompileJobs")
835 .HasForeignKey(
"RevisionInformationId")
836 .OnDelete(DeleteBehavior.Cascade)
841 b.Navigation(
"RevisionInformation");
844 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
846 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
847 .WithOne(
"DreamDaemonSettings")
848 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
849 .OnDelete(DeleteBehavior.Cascade)
852 b.Navigation(
"Instance");
855 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
857 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
858 .WithOne(
"DreamMakerSettings")
859 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
860 .OnDelete(DeleteBehavior.Cascade)
863 b.Navigation(
"Instance");
866 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
868 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
869 .WithMany(
"InstancePermissionSets")
870 .HasForeignKey(
"InstanceId")
871 .OnDelete(DeleteBehavior.Cascade)
874 b.HasOne(
"Tgstation.Server.Host.Models.PermissionSet",
"PermissionSet")
875 .WithMany(
"InstancePermissionSets")
876 .HasForeignKey(
"PermissionSetId")
877 .OnDelete(DeleteBehavior.Cascade)
880 b.Navigation(
"Instance");
882 b.Navigation(
"PermissionSet");
885 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
887 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
889 .HasForeignKey(
"CancelledById");
891 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
893 .HasForeignKey(
"InstanceId")
894 .OnDelete(DeleteBehavior.Cascade)
897 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
899 .HasForeignKey(
"StartedById")
900 .OnDelete(DeleteBehavior.Cascade)
903 b.Navigation(
"CancelledBy");
905 b.Navigation(
"Instance");
907 b.Navigation(
"StartedBy");
910 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
912 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
913 .WithMany(
"OAuthConnections")
914 .HasForeignKey(
"UserId")
915 .OnDelete(DeleteBehavior.Cascade);
917 b.Navigation(
"User");
920 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
922 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
923 .WithOne(
"PermissionSet")
924 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"GroupId")
925 .OnDelete(DeleteBehavior.Cascade);
927 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
928 .WithOne(
"PermissionSet")
929 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"UserId")
930 .OnDelete(DeleteBehavior.Cascade);
932 b.Navigation(
"Group");
934 b.Navigation(
"User");
937 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
939 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
941 .HasForeignKey(
"CompileJobId")
942 .OnDelete(DeleteBehavior.Cascade)
945 b.Navigation(
"CompileJob");
948 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
950 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
951 .WithOne(
"RepositorySettings")
952 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
953 .OnDelete(DeleteBehavior.Cascade)
956 b.Navigation(
"Instance");
959 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
961 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
962 .WithMany(
"ActiveTestMerges")
963 .HasForeignKey(
"RevisionInformationId")
964 .OnDelete(DeleteBehavior.Cascade)
967 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
968 .WithMany(
"RevisonInformations")
969 .HasForeignKey(
"TestMergeId")
970 .OnDelete(DeleteBehavior.ClientNoAction)
973 b.Navigation(
"RevisionInformation");
975 b.Navigation(
"TestMerge");
978 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
980 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
981 .WithMany(
"RevisionInformations")
982 .HasForeignKey(
"InstanceId")
983 .OnDelete(DeleteBehavior.Cascade)
986 b.Navigation(
"Instance");
989 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
991 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
992 .WithMany(
"TestMerges")
993 .HasForeignKey(
"MergedById")
994 .OnDelete(DeleteBehavior.Restrict)
997 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
998 .WithOne(
"PrimaryTestMerge")
999 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
1000 .OnDelete(DeleteBehavior.Cascade)
1003 b.Navigation(
"MergedBy");
1005 b.Navigation(
"PrimaryRevisionInformation");
1008 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
1010 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
1011 .WithMany(
"CreatedUsers")
1012 .HasForeignKey(
"CreatedById");
1014 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
1016 .HasForeignKey(
"GroupId");
1018 b.Navigation(
"CreatedBy");
1020 b.Navigation(
"Group");
1023 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
1025 b.Navigation(
"Channels");
1028 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
1030 b.Navigation(
"ChatSettings");
1032 b.Navigation(
"DreamDaemonSettings");
1034 b.Navigation(
"DreamMakerSettings");
1036 b.Navigation(
"InstancePermissionSets");
1038 b.Navigation(
"Jobs");
1040 b.Navigation(
"RepositorySettings");
1042 b.Navigation(
"RevisionInformations");
1045 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
1047 b.Navigation(
"InstancePermissionSets");
1050 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
1052 b.Navigation(
"ActiveTestMerges");
1054 b.Navigation(
"CompileJobs");
1056 b.Navigation(
"PrimaryTestMerge");
1059 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
1061 b.Navigation(
"RevisonInformations");
1064 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
1066 b.Navigation(
"CreatedUsers");
1068 b.Navigation(
"OAuthConnections");
1070 b.Navigation(
"PermissionSet");
1072 b.Navigation(
"TestMerges");
1075 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
1077 b.Navigation(
"PermissionSet")
1080 b.Navigation(
"Users");
1082#pragma warning restore 612, 618