17#pragma warning disable 612, 618
19 .HasAnnotation(
"ProductVersion",
"8.0.6")
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<
long?>(
"GitHubDeploymentId")
156 .HasColumnType(
"bigint");
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<
string>(
"AutoUpdateCron")
324 .HasColumnType(
"varchar(10000)");
326 b.Property<uint?>(
"AutoUpdateInterval")
328 .HasColumnType(
"int unsigned");
330 b.Property<ushort?>(
"ChatBotLimit")
332 .HasColumnType(
"smallint unsigned");
334 b.Property<
int>(
"ConfigurationType")
335 .HasColumnType(
"int");
337 b.Property<
string>(
"Name")
340 .HasColumnType(
"varchar(100)");
342 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Name"),
"utf8mb4");
344 b.Property<
bool?>(
"Online")
346 .HasColumnType(
"tinyint(1)");
348 b.Property<
string>(
"Path")
350 .HasColumnType(
"varchar(255)");
352 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Path"),
"utf8mb4");
354 b.Property<
string>(
"SwarmIdentifer")
355 .HasColumnType(
"varchar(255)");
357 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"SwarmIdentifer"),
"utf8mb4");
361 b.HasIndex(
"Path",
"SwarmIdentifer")
364 b.ToTable(
"Instances");
367 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
369 b.Property<
long>(
"Id")
370 .ValueGeneratedOnAdd()
371 .HasColumnType(
"bigint");
373 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long>(
"Id"));
375 b.Property<ulong>(
"ChatBotRights")
376 .HasColumnType(
"bigint unsigned");
378 b.Property<ulong>(
"ConfigurationRights")
379 .HasColumnType(
"bigint unsigned");
381 b.Property<ulong>(
"DreamDaemonRights")
382 .HasColumnType(
"bigint unsigned");
384 b.Property<ulong>(
"DreamMakerRights")
385 .HasColumnType(
"bigint unsigned");
387 b.Property<ulong>(
"EngineRights")
388 .HasColumnType(
"bigint unsigned");
390 b.Property<
long>(
"InstanceId")
391 .HasColumnType(
"bigint");
393 b.Property<ulong>(
"InstancePermissionSetRights")
394 .HasColumnType(
"bigint unsigned");
396 b.Property<
long>(
"PermissionSetId")
397 .HasColumnType(
"bigint");
399 b.Property<ulong>(
"RepositoryRights")
400 .HasColumnType(
"bigint unsigned");
404 b.HasIndex(
"InstanceId");
406 b.HasIndex(
"PermissionSetId",
"InstanceId")
409 b.ToTable(
"InstancePermissionSets");
412 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
414 b.Property<
long?>(
"Id")
415 .ValueGeneratedOnAdd()
416 .HasColumnType(
"bigint");
418 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long?>(
"Id"));
420 b.Property<ulong?>(
"CancelRight")
421 .HasColumnType(
"bigint unsigned");
423 b.Property<ulong?>(
"CancelRightsType")
424 .HasColumnType(
"bigint unsigned");
426 b.Property<
bool?>(
"Cancelled")
428 .HasColumnType(
"tinyint(1)");
430 b.Property<
long?>(
"CancelledById")
431 .HasColumnType(
"bigint");
433 b.Property<
string>(
"Description")
435 .HasColumnType(
"longtext");
437 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Description"),
"utf8mb4");
439 b.Property<uint?>(
"ErrorCode")
440 .HasColumnType(
"int unsigned");
442 b.Property<
string>(
"ExceptionDetails")
443 .HasColumnType(
"longtext");
445 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"ExceptionDetails"),
"utf8mb4");
447 b.Property<
long>(
"InstanceId")
448 .HasColumnType(
"bigint");
450 b.Property<
byte>(
"JobCode")
451 .HasColumnType(
"tinyint unsigned");
453 b.Property<DateTimeOffset?>(
"StartedAt")
455 .HasColumnType(
"datetime(6)");
457 b.Property<
long>(
"StartedById")
458 .HasColumnType(
"bigint");
460 b.Property<DateTimeOffset?>(
"StoppedAt")
461 .HasColumnType(
"datetime(6)");
465 b.HasIndex(
"CancelledById");
467 b.HasIndex(
"InstanceId");
469 b.HasIndex(
"StartedById");
474 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
476 b.Property<
long>(
"Id")
477 .ValueGeneratedOnAdd()
478 .HasColumnType(
"bigint");
480 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long>(
"Id"));
482 b.Property<
string>(
"ExternalUserId")
485 .HasColumnType(
"varchar(100)");
487 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"ExternalUserId"),
"utf8mb4");
489 b.Property<
int>(
"Provider")
490 .HasColumnType(
"int");
492 b.Property<
long?>(
"UserId")
493 .HasColumnType(
"bigint");
497 b.HasIndex(
"UserId");
499 b.HasIndex(
"Provider",
"ExternalUserId")
502 b.ToTable(
"OAuthConnections");
505 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
507 b.Property<
long?>(
"Id")
508 .ValueGeneratedOnAdd()
509 .HasColumnType(
"bigint");
511 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long?>(
"Id"));
513 b.Property<ulong>(
"AdministrationRights")
514 .HasColumnType(
"bigint unsigned");
516 b.Property<
long?>(
"GroupId")
517 .HasColumnType(
"bigint");
519 b.Property<ulong>(
"InstanceManagerRights")
520 .HasColumnType(
"bigint unsigned");
522 b.Property<
long?>(
"UserId")
523 .HasColumnType(
"bigint");
527 b.HasIndex(
"GroupId")
533 b.ToTable(
"PermissionSets");
536 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
538 b.Property<
long?>(
"Id")
539 .ValueGeneratedOnAdd()
540 .HasColumnType(
"bigint");
542 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long?>(
"Id"));
544 b.Property<
string>(
"AccessIdentifier")
546 .HasColumnType(
"longtext");
548 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"AccessIdentifier"),
"utf8mb4");
550 b.Property<
long>(
"CompileJobId")
551 .HasColumnType(
"bigint");
553 b.Property<
long?>(
"InitialCompileJobId")
554 .HasColumnType(
"bigint");
556 b.Property<
int>(
"LaunchSecurityLevel")
557 .HasColumnType(
"int");
559 b.Property<
int>(
"LaunchVisibility")
560 .HasColumnType(
"int");
562 b.Property<ushort>(
"Port")
563 .HasColumnType(
"smallint unsigned");
565 b.Property<
int>(
"ProcessId")
566 .HasColumnType(
"int");
568 b.Property<
int>(
"RebootState")
569 .HasColumnType(
"int");
571 b.Property<ushort?>(
"TopicPort")
572 .HasColumnType(
"smallint unsigned");
576 b.HasIndex(
"CompileJobId");
578 b.HasIndex(
"InitialCompileJobId");
580 b.ToTable(
"ReattachInformations");
583 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
585 b.Property<
long>(
"Id")
586 .ValueGeneratedOnAdd()
587 .HasColumnType(
"bigint");
589 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long>(
"Id"));
591 b.Property<
string>(
"AccessToken")
593 .HasColumnType(
"longtext");
595 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"AccessToken"),
"utf8mb4");
597 b.Property<
string>(
"AccessUser")
599 .HasColumnType(
"longtext");
601 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"AccessUser"),
"utf8mb4");
603 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
605 .HasColumnType(
"tinyint(1)");
607 b.Property<
bool?>(
"AutoUpdatesSynchronize")
609 .HasColumnType(
"tinyint(1)");
611 b.Property<
string>(
"CommitterEmail")
614 .HasColumnType(
"longtext");
616 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"CommitterEmail"),
"utf8mb4");
618 b.Property<
string>(
"CommitterName")
621 .HasColumnType(
"longtext");
623 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"CommitterName"),
"utf8mb4");
625 b.Property<
bool?>(
"CreateGitHubDeployments")
627 .HasColumnType(
"tinyint(1)");
629 b.Property<
long>(
"InstanceId")
630 .HasColumnType(
"bigint");
632 b.Property<
bool?>(
"PostTestMergeComment")
634 .HasColumnType(
"tinyint(1)");
636 b.Property<
bool?>(
"PushTestMergeCommits")
638 .HasColumnType(
"tinyint(1)");
640 b.Property<
bool?>(
"ShowTestMergeCommitters")
642 .HasColumnType(
"tinyint(1)");
644 b.Property<
bool?>(
"UpdateSubmodules")
646 .HasColumnType(
"tinyint(1)");
650 b.HasIndex(
"InstanceId")
653 b.ToTable(
"RepositorySettings");
656 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
658 b.Property<
long>(
"Id")
659 .ValueGeneratedOnAdd()
660 .HasColumnType(
"bigint");
662 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long>(
"Id"));
664 b.Property<
long>(
"RevisionInformationId")
665 .HasColumnType(
"bigint");
667 b.Property<
long>(
"TestMergeId")
668 .HasColumnType(
"bigint");
672 b.HasIndex(
"RevisionInformationId");
674 b.HasIndex(
"TestMergeId");
676 b.ToTable(
"RevInfoTestMerges");
679 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
681 b.Property<
long>(
"Id")
682 .ValueGeneratedOnAdd()
683 .HasColumnType(
"bigint");
685 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long>(
"Id"));
687 b.Property<
string>(
"CommitSha")
690 .HasColumnType(
"varchar(40)");
692 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"CommitSha"),
"utf8mb4");
694 b.Property<
long>(
"InstanceId")
695 .HasColumnType(
"bigint");
697 b.Property<
string>(
"OriginCommitSha")
700 .HasColumnType(
"varchar(40)");
702 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"OriginCommitSha"),
"utf8mb4");
704 b.Property<DateTimeOffset>(
"Timestamp")
705 .HasColumnType(
"datetime(6)");
709 b.HasIndex(
"InstanceId",
"CommitSha")
712 b.ToTable(
"RevisionInformations");
715 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
717 b.Property<
long>(
"Id")
718 .ValueGeneratedOnAdd()
719 .HasColumnType(
"bigint");
721 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long>(
"Id"));
723 b.Property<
string>(
"Author")
725 .HasColumnType(
"longtext");
727 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Author"),
"utf8mb4");
729 b.Property<
string>(
"BodyAtMerge")
731 .HasColumnType(
"longtext");
733 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"BodyAtMerge"),
"utf8mb4");
735 b.Property<
string>(
"Comment")
737 .HasColumnType(
"longtext");
739 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Comment"),
"utf8mb4");
741 b.Property<DateTimeOffset>(
"MergedAt")
742 .HasColumnType(
"datetime(6)");
744 b.Property<
long>(
"MergedById")
745 .HasColumnType(
"bigint");
747 b.Property<
int>(
"Number")
748 .HasColumnType(
"int");
750 b.Property<
long?>(
"PrimaryRevisionInformationId")
752 .HasColumnType(
"bigint");
754 b.Property<
string>(
"TargetCommitSha")
757 .HasColumnType(
"varchar(40)");
759 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"TargetCommitSha"),
"utf8mb4");
761 b.Property<
string>(
"TitleAtMerge")
763 .HasColumnType(
"longtext");
765 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"TitleAtMerge"),
"utf8mb4");
767 b.Property<
string>(
"Url")
769 .HasColumnType(
"longtext");
771 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Url"),
"utf8mb4");
775 b.HasIndex(
"MergedById");
777 b.HasIndex(
"PrimaryRevisionInformationId")
780 b.ToTable(
"TestMerges");
783 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
785 b.Property<
long?>(
"Id")
786 .ValueGeneratedOnAdd()
787 .HasColumnType(
"bigint");
789 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long?>(
"Id"));
791 b.Property<
string>(
"CanonicalName")
794 .HasColumnType(
"varchar(100)");
796 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"CanonicalName"),
"utf8mb4");
798 b.Property<DateTimeOffset?>(
"CreatedAt")
800 .HasColumnType(
"datetime(6)");
802 b.Property<
long?>(
"CreatedById")
803 .HasColumnType(
"bigint");
805 b.Property<
bool?>(
"Enabled")
807 .HasColumnType(
"tinyint(1)");
809 b.Property<
long?>(
"GroupId")
810 .HasColumnType(
"bigint");
812 b.Property<DateTimeOffset?>(
"LastPasswordUpdate")
813 .HasColumnType(
"datetime(6)");
815 b.Property<
string>(
"Name")
818 .HasColumnType(
"varchar(100)");
820 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Name"),
"utf8mb4");
822 b.Property<
string>(
"PasswordHash")
823 .HasColumnType(
"longtext");
825 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"PasswordHash"),
"utf8mb4");
827 b.Property<
string>(
"SystemIdentifier")
829 .HasColumnType(
"varchar(100)");
831 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"SystemIdentifier"),
"utf8mb4");
835 b.HasIndex(
"CanonicalName")
838 b.HasIndex(
"CreatedById");
840 b.HasIndex(
"GroupId");
842 b.HasIndex(
"SystemIdentifier")
848 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
850 b.Property<
long?>(
"Id")
851 .ValueGeneratedOnAdd()
852 .HasColumnType(
"bigint");
854 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long?>(
"Id"));
856 b.Property<
string>(
"Name")
859 .HasColumnType(
"varchar(100)");
861 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Name"),
"utf8mb4");
871 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
873 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
874 .WithMany(
"ChatSettings")
875 .HasForeignKey(
"InstanceId")
876 .OnDelete(DeleteBehavior.Cascade)
879 b.Navigation(
"Instance");
882 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
884 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
885 .WithMany(
"Channels")
886 .HasForeignKey(
"ChatSettingsId")
887 .OnDelete(DeleteBehavior.Cascade)
890 b.Navigation(
"ChatSettings");
893 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
895 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
897 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
898 .OnDelete(DeleteBehavior.Cascade)
901 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
902 .WithMany(
"CompileJobs")
903 .HasForeignKey(
"RevisionInformationId")
904 .OnDelete(DeleteBehavior.Cascade)
909 b.Navigation(
"RevisionInformation");
912 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
914 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
915 .WithOne(
"DreamDaemonSettings")
916 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
917 .OnDelete(DeleteBehavior.Cascade)
920 b.Navigation(
"Instance");
923 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
925 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
926 .WithOne(
"DreamMakerSettings")
927 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
928 .OnDelete(DeleteBehavior.Cascade)
931 b.Navigation(
"Instance");
934 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
936 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
937 .WithMany(
"InstancePermissionSets")
938 .HasForeignKey(
"InstanceId")
939 .OnDelete(DeleteBehavior.Cascade)
942 b.HasOne(
"Tgstation.Server.Host.Models.PermissionSet",
"PermissionSet")
943 .WithMany(
"InstancePermissionSets")
944 .HasForeignKey(
"PermissionSetId")
945 .OnDelete(DeleteBehavior.Cascade)
948 b.Navigation(
"Instance");
950 b.Navigation(
"PermissionSet");
953 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
955 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
957 .HasForeignKey(
"CancelledById");
959 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
961 .HasForeignKey(
"InstanceId")
962 .OnDelete(DeleteBehavior.Cascade)
965 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
967 .HasForeignKey(
"StartedById")
968 .OnDelete(DeleteBehavior.Cascade)
971 b.Navigation(
"CancelledBy");
973 b.Navigation(
"Instance");
975 b.Navigation(
"StartedBy");
978 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
980 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
981 .WithMany(
"OAuthConnections")
982 .HasForeignKey(
"UserId")
983 .OnDelete(DeleteBehavior.Cascade);
985 b.Navigation(
"User");
988 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
990 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
991 .WithOne(
"PermissionSet")
992 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"GroupId")
993 .OnDelete(DeleteBehavior.Cascade);
995 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
996 .WithOne(
"PermissionSet")
997 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"UserId")
998 .OnDelete(DeleteBehavior.Cascade);
1000 b.Navigation(
"Group");
1002 b.Navigation(
"User");
1005 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
1007 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
1009 .HasForeignKey(
"CompileJobId")
1010 .OnDelete(DeleteBehavior.Cascade)
1013 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"InitialCompileJob")
1015 .HasForeignKey(
"InitialCompileJobId");
1017 b.Navigation(
"CompileJob");
1019 b.Navigation(
"InitialCompileJob");
1022 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
1024 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
1025 .WithOne(
"RepositorySettings")
1026 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
1027 .OnDelete(DeleteBehavior.Cascade)
1030 b.Navigation(
"Instance");
1033 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
1035 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
1036 .WithMany(
"ActiveTestMerges")
1037 .HasForeignKey(
"RevisionInformationId")
1038 .OnDelete(DeleteBehavior.Cascade)
1041 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
1042 .WithMany(
"RevisonInformations")
1043 .HasForeignKey(
"TestMergeId")
1044 .OnDelete(DeleteBehavior.ClientNoAction)
1047 b.Navigation(
"RevisionInformation");
1049 b.Navigation(
"TestMerge");
1052 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
1054 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
1055 .WithMany(
"RevisionInformations")
1056 .HasForeignKey(
"InstanceId")
1057 .OnDelete(DeleteBehavior.Cascade)
1060 b.Navigation(
"Instance");
1063 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
1065 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
1066 .WithMany(
"TestMerges")
1067 .HasForeignKey(
"MergedById")
1068 .OnDelete(DeleteBehavior.Restrict)
1071 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
1072 .WithOne(
"PrimaryTestMerge")
1073 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
1074 .OnDelete(DeleteBehavior.Cascade)
1077 b.Navigation(
"MergedBy");
1079 b.Navigation(
"PrimaryRevisionInformation");
1082 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
1084 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
1085 .WithMany(
"CreatedUsers")
1086 .HasForeignKey(
"CreatedById");
1088 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
1090 .HasForeignKey(
"GroupId");
1092 b.Navigation(
"CreatedBy");
1094 b.Navigation(
"Group");
1097 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
1099 b.Navigation(
"Channels");
1102 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
1104 b.Navigation(
"ChatSettings");
1106 b.Navigation(
"DreamDaemonSettings");
1108 b.Navigation(
"DreamMakerSettings");
1110 b.Navigation(
"InstancePermissionSets");
1112 b.Navigation(
"Jobs");
1114 b.Navigation(
"RepositorySettings");
1116 b.Navigation(
"RevisionInformations");
1119 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
1121 b.Navigation(
"InstancePermissionSets");
1124 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
1126 b.Navigation(
"ActiveTestMerges");
1128 b.Navigation(
"CompileJobs");
1130 b.Navigation(
"PrimaryTestMerge");
1133 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
1135 b.Navigation(
"RevisonInformations");
1138 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
1140 b.Navigation(
"CreatedUsers");
1142 b.Navigation(
"OAuthConnections");
1144 b.Navigation(
"PermissionSet");
1146 b.Navigation(
"TestMerges");
1149 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
1151 b.Navigation(
"PermissionSet")
1154 b.Navigation(
"Users");
1156#pragma warning restore 612, 618