17#pragma warning disable 612, 618
19 .HasAnnotation(
"ProductVersion",
"8.0.4")
20 .HasAnnotation(
"Relational:MaxIdentifierLength", 64);
22 MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder);
24 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
26 b.Property<
long?>(
"Id")
27 .ValueGeneratedOnAdd()
28 .HasColumnType(
"bigint");
30 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long?>(
"Id"));
32 b.Property<ushort?>(
"ChannelLimit")
34 .HasColumnType(
"smallint unsigned");
36 b.Property<
string>(
"ConnectionString")
39 .HasColumnType(
"longtext");
41 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"ConnectionString"),
"utf8mb4");
43 b.Property<
bool?>(
"Enabled")
44 .HasColumnType(
"tinyint(1)");
46 b.Property<
long>(
"InstanceId")
47 .HasColumnType(
"bigint");
49 b.Property<
string>(
"Name")
52 .HasColumnType(
"varchar(100)");
54 b.Property<
int>(
"Provider")
55 .HasColumnType(
"int");
57 b.Property<uint?>(
"ReconnectionInterval")
59 .HasColumnType(
"int unsigned");
63 b.HasIndex(
"InstanceId",
"Name")
66 b.ToTable(
"ChatBots");
69 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
71 b.Property<
long>(
"Id")
72 .ValueGeneratedOnAdd()
73 .HasColumnType(
"bigint");
75 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long>(
"Id"));
77 b.Property<
long>(
"ChatSettingsId")
78 .HasColumnType(
"bigint");
80 b.Property<ulong?>(
"DiscordChannelId")
81 .HasColumnType(
"bigint unsigned");
83 b.Property<
string>(
"IrcChannel")
85 .HasColumnType(
"varchar(100)");
87 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"IrcChannel"),
"utf8mb4");
89 b.Property<
bool?>(
"IsAdminChannel")
91 .HasColumnType(
"tinyint(1)");
93 b.Property<
bool?>(
"IsSystemChannel")
95 .HasColumnType(
"tinyint(1)");
97 b.Property<
bool?>(
"IsUpdatesChannel")
99 .HasColumnType(
"tinyint(1)");
101 b.Property<
bool?>(
"IsWatchdogChannel")
103 .HasColumnType(
"tinyint(1)");
105 b.Property<
string>(
"Tag")
107 .HasColumnType(
"longtext");
109 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Tag"),
"utf8mb4");
113 b.HasIndex(
"ChatSettingsId",
"DiscordChannelId")
116 b.HasIndex(
"ChatSettingsId",
"IrcChannel")
119 b.ToTable(
"ChatChannels");
122 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
124 b.Property<
long?>(
"Id")
125 .ValueGeneratedOnAdd()
126 .HasColumnType(
"bigint");
128 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long?>(
"Id"));
130 b.Property<
int?>(
"DMApiMajorVersion")
131 .HasColumnType(
"int");
133 b.Property<
int?>(
"DMApiMinorVersion")
134 .HasColumnType(
"int");
136 b.Property<
int?>(
"DMApiPatchVersion")
137 .HasColumnType(
"int");
139 b.Property<Guid?>(
"DirectoryName")
141 .HasColumnType(
"char(36)");
143 b.Property<
string>(
"DmeName")
145 .HasColumnType(
"longtext");
147 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"DmeName"),
"utf8mb4");
149 b.Property<
string>(
"EngineVersion")
151 .HasColumnType(
"longtext");
153 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"EngineVersion"),
"utf8mb4");
155 b.Property<
int?>(
"GitHubDeploymentId")
156 .HasColumnType(
"int");
158 b.Property<
long?>(
"GitHubRepoId")
159 .HasColumnType(
"bigint");
161 b.Property<
long>(
"JobId")
162 .HasColumnType(
"bigint");
164 b.Property<
int?>(
"MinimumSecurityLevel")
165 .HasColumnType(
"int");
167 b.Property<
string>(
"Output")
169 .HasColumnType(
"longtext");
171 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Output"),
"utf8mb4");
173 b.Property<
string>(
"RepositoryOrigin")
174 .HasColumnType(
"longtext");
176 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"RepositoryOrigin"),
"utf8mb4");
178 b.Property<
long>(
"RevisionInformationId")
179 .HasColumnType(
"bigint");
183 b.HasIndex(
"DirectoryName");
188 b.HasIndex(
"RevisionInformationId");
190 b.ToTable(
"CompileJobs");
193 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
195 b.Property<
long>(
"Id")
196 .ValueGeneratedOnAdd()
197 .HasColumnType(
"bigint");
199 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long>(
"Id"));
201 b.Property<
string>(
"AdditionalParameters")
204 .HasColumnType(
"longtext");
206 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"AdditionalParameters"),
"utf8mb4");
208 b.Property<
bool?>(
"AllowWebClient")
210 .HasColumnType(
"tinyint(1)");
212 b.Property<
bool?>(
"AutoStart")
214 .HasColumnType(
"tinyint(1)");
216 b.Property<
bool?>(
"DumpOnHealthCheckRestart")
218 .HasColumnType(
"tinyint(1)");
220 b.Property<uint?>(
"HealthCheckSeconds")
222 .HasColumnType(
"int unsigned");
224 b.Property<
long>(
"InstanceId")
225 .HasColumnType(
"bigint");
227 b.Property<
bool?>(
"LogOutput")
229 .HasColumnType(
"tinyint(1)");
231 b.Property<uint?>(
"MapThreads")
233 .HasColumnType(
"int unsigned");
235 b.Property<
bool?>(
"Minidumps")
237 .HasColumnType(
"tinyint(1)");
239 b.Property<ushort?>(
"Port")
241 .HasColumnType(
"smallint unsigned");
243 b.Property<
int>(
"SecurityLevel")
244 .HasColumnType(
"int");
246 b.Property<
bool?>(
"StartProfiler")
248 .HasColumnType(
"tinyint(1)");
250 b.Property<uint?>(
"StartupTimeout")
252 .HasColumnType(
"int unsigned");
254 b.Property<uint?>(
"TopicRequestTimeout")
256 .HasColumnType(
"int unsigned");
258 b.Property<
int>(
"Visibility")
259 .HasColumnType(
"int");
263 b.HasIndex(
"InstanceId")
266 b.ToTable(
"DreamDaemonSettings");
269 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
271 b.Property<
long>(
"Id")
272 .ValueGeneratedOnAdd()
273 .HasColumnType(
"bigint");
275 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long>(
"Id"));
277 b.Property<ushort?>(
"ApiValidationPort")
279 .HasColumnType(
"smallint unsigned");
281 b.Property<
int>(
"ApiValidationSecurityLevel")
282 .HasColumnType(
"int");
284 b.Property<
string>(
"CompilerAdditionalArguments")
286 .HasColumnType(
"varchar(10000)");
288 b.Property<
long>(
"InstanceId")
289 .HasColumnType(
"bigint");
291 b.Property<
string>(
"ProjectName")
293 .HasColumnType(
"longtext");
295 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"ProjectName"),
"utf8mb4");
297 b.Property<
bool?>(
"RequireDMApiValidation")
299 .HasColumnType(
"tinyint(1)");
301 b.Property<TimeSpan?>(
"Timeout")
303 .HasColumnType(
"time(6)");
307 b.HasIndex(
"InstanceId")
310 b.ToTable(
"DreamMakerSettings");
313 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
315 b.Property<
long?>(
"Id")
316 .ValueGeneratedOnAdd()
317 .HasColumnType(
"bigint");
319 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long?>(
"Id"));
321 b.Property<uint?>(
"AutoUpdateInterval")
323 .HasColumnType(
"int unsigned");
325 b.Property<ushort?>(
"ChatBotLimit")
327 .HasColumnType(
"smallint unsigned");
329 b.Property<
int>(
"ConfigurationType")
330 .HasColumnType(
"int");
332 b.Property<
string>(
"Name")
335 .HasColumnType(
"varchar(100)");
337 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Name"),
"utf8mb4");
339 b.Property<
bool?>(
"Online")
341 .HasColumnType(
"tinyint(1)");
343 b.Property<
string>(
"Path")
345 .HasColumnType(
"varchar(255)");
347 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Path"),
"utf8mb4");
349 b.Property<
string>(
"SwarmIdentifer")
350 .HasColumnType(
"varchar(255)");
352 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"SwarmIdentifer"),
"utf8mb4");
356 b.HasIndex(
"Path",
"SwarmIdentifer")
359 b.ToTable(
"Instances");
362 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
364 b.Property<
long>(
"Id")
365 .ValueGeneratedOnAdd()
366 .HasColumnType(
"bigint");
368 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long>(
"Id"));
370 b.Property<ulong>(
"ChatBotRights")
371 .HasColumnType(
"bigint unsigned");
373 b.Property<ulong>(
"ConfigurationRights")
374 .HasColumnType(
"bigint unsigned");
376 b.Property<ulong>(
"DreamDaemonRights")
377 .HasColumnType(
"bigint unsigned");
379 b.Property<ulong>(
"DreamMakerRights")
380 .HasColumnType(
"bigint unsigned");
382 b.Property<ulong>(
"EngineRights")
383 .HasColumnType(
"bigint unsigned");
385 b.Property<
long>(
"InstanceId")
386 .HasColumnType(
"bigint");
388 b.Property<ulong>(
"InstancePermissionSetRights")
389 .HasColumnType(
"bigint unsigned");
391 b.Property<
long>(
"PermissionSetId")
392 .HasColumnType(
"bigint");
394 b.Property<ulong>(
"RepositoryRights")
395 .HasColumnType(
"bigint unsigned");
399 b.HasIndex(
"InstanceId");
401 b.HasIndex(
"PermissionSetId",
"InstanceId")
404 b.ToTable(
"InstancePermissionSets");
407 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
409 b.Property<
long?>(
"Id")
410 .ValueGeneratedOnAdd()
411 .HasColumnType(
"bigint");
413 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long?>(
"Id"));
415 b.Property<ulong?>(
"CancelRight")
416 .HasColumnType(
"bigint unsigned");
418 b.Property<ulong?>(
"CancelRightsType")
419 .HasColumnType(
"bigint unsigned");
421 b.Property<
bool?>(
"Cancelled")
423 .HasColumnType(
"tinyint(1)");
425 b.Property<
long?>(
"CancelledById")
426 .HasColumnType(
"bigint");
428 b.Property<
string>(
"Description")
430 .HasColumnType(
"longtext");
432 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Description"),
"utf8mb4");
434 b.Property<uint?>(
"ErrorCode")
435 .HasColumnType(
"int unsigned");
437 b.Property<
string>(
"ExceptionDetails")
438 .HasColumnType(
"longtext");
440 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"ExceptionDetails"),
"utf8mb4");
442 b.Property<
long>(
"InstanceId")
443 .HasColumnType(
"bigint");
445 b.Property<
byte>(
"JobCode")
446 .HasColumnType(
"tinyint unsigned");
448 b.Property<DateTimeOffset?>(
"StartedAt")
450 .HasColumnType(
"datetime(6)");
452 b.Property<
long>(
"StartedById")
453 .HasColumnType(
"bigint");
455 b.Property<DateTimeOffset?>(
"StoppedAt")
456 .HasColumnType(
"datetime(6)");
460 b.HasIndex(
"CancelledById");
462 b.HasIndex(
"InstanceId");
464 b.HasIndex(
"StartedById");
469 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
471 b.Property<
long>(
"Id")
472 .ValueGeneratedOnAdd()
473 .HasColumnType(
"bigint");
475 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long>(
"Id"));
477 b.Property<
string>(
"ExternalUserId")
480 .HasColumnType(
"varchar(100)");
482 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"ExternalUserId"),
"utf8mb4");
484 b.Property<
int>(
"Provider")
485 .HasColumnType(
"int");
487 b.Property<
long?>(
"UserId")
488 .HasColumnType(
"bigint");
492 b.HasIndex(
"UserId");
494 b.HasIndex(
"Provider",
"ExternalUserId")
497 b.ToTable(
"OAuthConnections");
500 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
502 b.Property<
long?>(
"Id")
503 .ValueGeneratedOnAdd()
504 .HasColumnType(
"bigint");
506 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long?>(
"Id"));
508 b.Property<ulong>(
"AdministrationRights")
509 .HasColumnType(
"bigint unsigned");
511 b.Property<
long?>(
"GroupId")
512 .HasColumnType(
"bigint");
514 b.Property<ulong>(
"InstanceManagerRights")
515 .HasColumnType(
"bigint unsigned");
517 b.Property<
long?>(
"UserId")
518 .HasColumnType(
"bigint");
522 b.HasIndex(
"GroupId")
528 b.ToTable(
"PermissionSets");
531 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
533 b.Property<
long?>(
"Id")
534 .ValueGeneratedOnAdd()
535 .HasColumnType(
"bigint");
537 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long?>(
"Id"));
539 b.Property<
string>(
"AccessIdentifier")
541 .HasColumnType(
"longtext");
543 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"AccessIdentifier"),
"utf8mb4");
545 b.Property<
long>(
"CompileJobId")
546 .HasColumnType(
"bigint");
548 b.Property<
long?>(
"InitialCompileJobId")
549 .HasColumnType(
"bigint");
551 b.Property<
int>(
"LaunchSecurityLevel")
552 .HasColumnType(
"int");
554 b.Property<
int>(
"LaunchVisibility")
555 .HasColumnType(
"int");
557 b.Property<ushort>(
"Port")
558 .HasColumnType(
"smallint unsigned");
560 b.Property<
int>(
"ProcessId")
561 .HasColumnType(
"int");
563 b.Property<
int>(
"RebootState")
564 .HasColumnType(
"int");
566 b.Property<ushort?>(
"TopicPort")
567 .HasColumnType(
"smallint unsigned");
571 b.HasIndex(
"CompileJobId");
573 b.HasIndex(
"InitialCompileJobId");
575 b.ToTable(
"ReattachInformations");
578 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
580 b.Property<
long>(
"Id")
581 .ValueGeneratedOnAdd()
582 .HasColumnType(
"bigint");
584 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long>(
"Id"));
586 b.Property<
string>(
"AccessToken")
588 .HasColumnType(
"longtext");
590 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"AccessToken"),
"utf8mb4");
592 b.Property<
string>(
"AccessUser")
594 .HasColumnType(
"longtext");
596 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"AccessUser"),
"utf8mb4");
598 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
600 .HasColumnType(
"tinyint(1)");
602 b.Property<
bool?>(
"AutoUpdatesSynchronize")
604 .HasColumnType(
"tinyint(1)");
606 b.Property<
string>(
"CommitterEmail")
609 .HasColumnType(
"longtext");
611 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"CommitterEmail"),
"utf8mb4");
613 b.Property<
string>(
"CommitterName")
616 .HasColumnType(
"longtext");
618 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"CommitterName"),
"utf8mb4");
620 b.Property<
bool?>(
"CreateGitHubDeployments")
622 .HasColumnType(
"tinyint(1)");
624 b.Property<
long>(
"InstanceId")
625 .HasColumnType(
"bigint");
627 b.Property<
bool?>(
"PostTestMergeComment")
629 .HasColumnType(
"tinyint(1)");
631 b.Property<
bool?>(
"PushTestMergeCommits")
633 .HasColumnType(
"tinyint(1)");
635 b.Property<
bool?>(
"ShowTestMergeCommitters")
637 .HasColumnType(
"tinyint(1)");
639 b.Property<
bool?>(
"UpdateSubmodules")
641 .HasColumnType(
"tinyint(1)");
645 b.HasIndex(
"InstanceId")
648 b.ToTable(
"RepositorySettings");
651 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
653 b.Property<
long>(
"Id")
654 .ValueGeneratedOnAdd()
655 .HasColumnType(
"bigint");
657 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long>(
"Id"));
659 b.Property<
long>(
"RevisionInformationId")
660 .HasColumnType(
"bigint");
662 b.Property<
long>(
"TestMergeId")
663 .HasColumnType(
"bigint");
667 b.HasIndex(
"RevisionInformationId");
669 b.HasIndex(
"TestMergeId");
671 b.ToTable(
"RevInfoTestMerges");
674 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
676 b.Property<
long>(
"Id")
677 .ValueGeneratedOnAdd()
678 .HasColumnType(
"bigint");
680 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long>(
"Id"));
682 b.Property<
string>(
"CommitSha")
685 .HasColumnType(
"varchar(40)");
687 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"CommitSha"),
"utf8mb4");
689 b.Property<
long>(
"InstanceId")
690 .HasColumnType(
"bigint");
692 b.Property<
string>(
"OriginCommitSha")
695 .HasColumnType(
"varchar(40)");
697 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"OriginCommitSha"),
"utf8mb4");
699 b.Property<DateTimeOffset>(
"Timestamp")
700 .HasColumnType(
"datetime(6)");
704 b.HasIndex(
"InstanceId",
"CommitSha")
707 b.ToTable(
"RevisionInformations");
710 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
712 b.Property<
long>(
"Id")
713 .ValueGeneratedOnAdd()
714 .HasColumnType(
"bigint");
716 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long>(
"Id"));
718 b.Property<
string>(
"Author")
720 .HasColumnType(
"longtext");
722 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Author"),
"utf8mb4");
724 b.Property<
string>(
"BodyAtMerge")
726 .HasColumnType(
"longtext");
728 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"BodyAtMerge"),
"utf8mb4");
730 b.Property<
string>(
"Comment")
732 .HasColumnType(
"longtext");
734 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Comment"),
"utf8mb4");
736 b.Property<DateTimeOffset>(
"MergedAt")
737 .HasColumnType(
"datetime(6)");
739 b.Property<
long>(
"MergedById")
740 .HasColumnType(
"bigint");
742 b.Property<
int>(
"Number")
743 .HasColumnType(
"int");
745 b.Property<
long?>(
"PrimaryRevisionInformationId")
747 .HasColumnType(
"bigint");
749 b.Property<
string>(
"TargetCommitSha")
752 .HasColumnType(
"varchar(40)");
754 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"TargetCommitSha"),
"utf8mb4");
756 b.Property<
string>(
"TitleAtMerge")
758 .HasColumnType(
"longtext");
760 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"TitleAtMerge"),
"utf8mb4");
762 b.Property<
string>(
"Url")
764 .HasColumnType(
"longtext");
766 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Url"),
"utf8mb4");
770 b.HasIndex(
"MergedById");
772 b.HasIndex(
"PrimaryRevisionInformationId")
775 b.ToTable(
"TestMerges");
778 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
780 b.Property<
long?>(
"Id")
781 .ValueGeneratedOnAdd()
782 .HasColumnType(
"bigint");
784 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long?>(
"Id"));
786 b.Property<
string>(
"CanonicalName")
789 .HasColumnType(
"varchar(100)");
791 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"CanonicalName"),
"utf8mb4");
793 b.Property<DateTimeOffset?>(
"CreatedAt")
795 .HasColumnType(
"datetime(6)");
797 b.Property<
long?>(
"CreatedById")
798 .HasColumnType(
"bigint");
800 b.Property<
bool?>(
"Enabled")
802 .HasColumnType(
"tinyint(1)");
804 b.Property<
long?>(
"GroupId")
805 .HasColumnType(
"bigint");
807 b.Property<DateTimeOffset?>(
"LastPasswordUpdate")
808 .HasColumnType(
"datetime(6)");
810 b.Property<
string>(
"Name")
813 .HasColumnType(
"varchar(100)");
815 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Name"),
"utf8mb4");
817 b.Property<
string>(
"PasswordHash")
818 .HasColumnType(
"longtext");
820 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"PasswordHash"),
"utf8mb4");
822 b.Property<
string>(
"SystemIdentifier")
824 .HasColumnType(
"varchar(100)");
826 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"SystemIdentifier"),
"utf8mb4");
830 b.HasIndex(
"CanonicalName")
833 b.HasIndex(
"CreatedById");
835 b.HasIndex(
"GroupId");
837 b.HasIndex(
"SystemIdentifier")
843 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
845 b.Property<
long?>(
"Id")
846 .ValueGeneratedOnAdd()
847 .HasColumnType(
"bigint");
849 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long?>(
"Id"));
851 b.Property<
string>(
"Name")
854 .HasColumnType(
"varchar(100)");
856 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Name"),
"utf8mb4");
866 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
868 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
869 .WithMany(
"ChatSettings")
870 .HasForeignKey(
"InstanceId")
871 .OnDelete(DeleteBehavior.Cascade)
874 b.Navigation(
"Instance");
877 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
879 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
880 .WithMany(
"Channels")
881 .HasForeignKey(
"ChatSettingsId")
882 .OnDelete(DeleteBehavior.Cascade)
885 b.Navigation(
"ChatSettings");
888 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
890 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
892 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
893 .OnDelete(DeleteBehavior.Cascade)
896 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
897 .WithMany(
"CompileJobs")
898 .HasForeignKey(
"RevisionInformationId")
899 .OnDelete(DeleteBehavior.Cascade)
904 b.Navigation(
"RevisionInformation");
907 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
909 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
910 .WithOne(
"DreamDaemonSettings")
911 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
912 .OnDelete(DeleteBehavior.Cascade)
915 b.Navigation(
"Instance");
918 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
920 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
921 .WithOne(
"DreamMakerSettings")
922 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
923 .OnDelete(DeleteBehavior.Cascade)
926 b.Navigation(
"Instance");
929 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
931 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
932 .WithMany(
"InstancePermissionSets")
933 .HasForeignKey(
"InstanceId")
934 .OnDelete(DeleteBehavior.Cascade)
937 b.HasOne(
"Tgstation.Server.Host.Models.PermissionSet",
"PermissionSet")
938 .WithMany(
"InstancePermissionSets")
939 .HasForeignKey(
"PermissionSetId")
940 .OnDelete(DeleteBehavior.Cascade)
943 b.Navigation(
"Instance");
945 b.Navigation(
"PermissionSet");
948 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
950 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
952 .HasForeignKey(
"CancelledById");
954 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
956 .HasForeignKey(
"InstanceId")
957 .OnDelete(DeleteBehavior.Cascade)
960 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
962 .HasForeignKey(
"StartedById")
963 .OnDelete(DeleteBehavior.Cascade)
966 b.Navigation(
"CancelledBy");
968 b.Navigation(
"Instance");
970 b.Navigation(
"StartedBy");
973 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
975 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
976 .WithMany(
"OAuthConnections")
977 .HasForeignKey(
"UserId")
978 .OnDelete(DeleteBehavior.Cascade);
980 b.Navigation(
"User");
983 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
985 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
986 .WithOne(
"PermissionSet")
987 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"GroupId")
988 .OnDelete(DeleteBehavior.Cascade);
990 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
991 .WithOne(
"PermissionSet")
992 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"UserId")
993 .OnDelete(DeleteBehavior.Cascade);
995 b.Navigation(
"Group");
997 b.Navigation(
"User");
1000 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
1002 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
1004 .HasForeignKey(
"CompileJobId")
1005 .OnDelete(DeleteBehavior.Cascade)
1008 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"InitialCompileJob")
1010 .HasForeignKey(
"InitialCompileJobId");
1012 b.Navigation(
"CompileJob");
1014 b.Navigation(
"InitialCompileJob");
1017 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
1019 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
1020 .WithOne(
"RepositorySettings")
1021 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
1022 .OnDelete(DeleteBehavior.Cascade)
1025 b.Navigation(
"Instance");
1028 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
1030 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
1031 .WithMany(
"ActiveTestMerges")
1032 .HasForeignKey(
"RevisionInformationId")
1033 .OnDelete(DeleteBehavior.Cascade)
1036 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
1037 .WithMany(
"RevisonInformations")
1038 .HasForeignKey(
"TestMergeId")
1039 .OnDelete(DeleteBehavior.ClientNoAction)
1042 b.Navigation(
"RevisionInformation");
1044 b.Navigation(
"TestMerge");
1047 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
1049 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
1050 .WithMany(
"RevisionInformations")
1051 .HasForeignKey(
"InstanceId")
1052 .OnDelete(DeleteBehavior.Cascade)
1055 b.Navigation(
"Instance");
1058 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
1060 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
1061 .WithMany(
"TestMerges")
1062 .HasForeignKey(
"MergedById")
1063 .OnDelete(DeleteBehavior.Restrict)
1066 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
1067 .WithOne(
"PrimaryTestMerge")
1068 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
1069 .OnDelete(DeleteBehavior.Cascade)
1072 b.Navigation(
"MergedBy");
1074 b.Navigation(
"PrimaryRevisionInformation");
1077 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
1079 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
1080 .WithMany(
"CreatedUsers")
1081 .HasForeignKey(
"CreatedById");
1083 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
1085 .HasForeignKey(
"GroupId");
1087 b.Navigation(
"CreatedBy");
1089 b.Navigation(
"Group");
1092 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
1094 b.Navigation(
"Channels");
1097 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
1099 b.Navigation(
"ChatSettings");
1101 b.Navigation(
"DreamDaemonSettings");
1103 b.Navigation(
"DreamMakerSettings");
1105 b.Navigation(
"InstancePermissionSets");
1107 b.Navigation(
"Jobs");
1109 b.Navigation(
"RepositorySettings");
1111 b.Navigation(
"RevisionInformations");
1114 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
1116 b.Navigation(
"InstancePermissionSets");
1119 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
1121 b.Navigation(
"ActiveTestMerges");
1123 b.Navigation(
"CompileJobs");
1125 b.Navigation(
"PrimaryTestMerge");
1128 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
1130 b.Navigation(
"RevisonInformations");
1133 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
1135 b.Navigation(
"CreatedUsers");
1137 b.Navigation(
"OAuthConnections");
1139 b.Navigation(
"PermissionSet");
1141 b.Navigation(
"TestMerges");
1144 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
1146 b.Navigation(
"PermissionSet")
1149 b.Navigation(
"Users");
1151#pragma warning restore 612, 618