17#pragma warning disable 612, 618
19 .HasAnnotation(
"ProductVersion",
"8.0.7")
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?>(
"OpenDreamTopicPort")
241 .HasColumnType(
"smallint unsigned");
243 b.Property<ushort?>(
"Port")
245 .HasColumnType(
"smallint unsigned");
247 b.Property<
int>(
"SecurityLevel")
248 .HasColumnType(
"int");
250 b.Property<
bool?>(
"StartProfiler")
252 .HasColumnType(
"tinyint(1)");
254 b.Property<uint?>(
"StartupTimeout")
256 .HasColumnType(
"int unsigned");
258 b.Property<uint?>(
"TopicRequestTimeout")
260 .HasColumnType(
"int unsigned");
262 b.Property<
int>(
"Visibility")
263 .HasColumnType(
"int");
267 b.HasIndex(
"InstanceId")
270 b.ToTable(
"DreamDaemonSettings");
273 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
275 b.Property<
long>(
"Id")
276 .ValueGeneratedOnAdd()
277 .HasColumnType(
"bigint");
279 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long>(
"Id"));
281 b.Property<ushort?>(
"ApiValidationPort")
283 .HasColumnType(
"smallint unsigned");
285 b.Property<
int>(
"ApiValidationSecurityLevel")
286 .HasColumnType(
"int");
288 b.Property<
string>(
"CompilerAdditionalArguments")
290 .HasColumnType(
"varchar(10000)");
292 b.Property<
long>(
"InstanceId")
293 .HasColumnType(
"bigint");
295 b.Property<
string>(
"ProjectName")
297 .HasColumnType(
"longtext");
299 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"ProjectName"),
"utf8mb4");
301 b.Property<
bool?>(
"RequireDMApiValidation")
303 .HasColumnType(
"tinyint(1)");
305 b.Property<TimeSpan?>(
"Timeout")
307 .HasColumnType(
"time(6)");
311 b.HasIndex(
"InstanceId")
314 b.ToTable(
"DreamMakerSettings");
317 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
319 b.Property<
long?>(
"Id")
320 .ValueGeneratedOnAdd()
321 .HasColumnType(
"bigint");
323 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long?>(
"Id"));
325 b.Property<
string>(
"AutoUpdateCron")
328 .HasColumnType(
"varchar(10000)");
330 b.Property<uint?>(
"AutoUpdateInterval")
332 .HasColumnType(
"int unsigned");
334 b.Property<ushort?>(
"ChatBotLimit")
336 .HasColumnType(
"smallint unsigned");
338 b.Property<
int>(
"ConfigurationType")
339 .HasColumnType(
"int");
341 b.Property<
string>(
"Name")
344 .HasColumnType(
"varchar(100)");
346 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Name"),
"utf8mb4");
348 b.Property<
bool?>(
"Online")
350 .HasColumnType(
"tinyint(1)");
352 b.Property<
string>(
"Path")
354 .HasColumnType(
"varchar(255)");
356 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Path"),
"utf8mb4");
358 b.Property<
string>(
"SwarmIdentifer")
359 .HasColumnType(
"varchar(255)");
361 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"SwarmIdentifer"),
"utf8mb4");
365 b.HasIndex(
"Path",
"SwarmIdentifer")
368 b.ToTable(
"Instances");
371 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
373 b.Property<
long>(
"Id")
374 .ValueGeneratedOnAdd()
375 .HasColumnType(
"bigint");
377 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long>(
"Id"));
379 b.Property<ulong>(
"ChatBotRights")
380 .HasColumnType(
"bigint unsigned");
382 b.Property<ulong>(
"ConfigurationRights")
383 .HasColumnType(
"bigint unsigned");
385 b.Property<ulong>(
"DreamDaemonRights")
386 .HasColumnType(
"bigint unsigned");
388 b.Property<ulong>(
"DreamMakerRights")
389 .HasColumnType(
"bigint unsigned");
391 b.Property<ulong>(
"EngineRights")
392 .HasColumnType(
"bigint unsigned");
394 b.Property<
long>(
"InstanceId")
395 .HasColumnType(
"bigint");
397 b.Property<ulong>(
"InstancePermissionSetRights")
398 .HasColumnType(
"bigint unsigned");
400 b.Property<
long>(
"PermissionSetId")
401 .HasColumnType(
"bigint");
403 b.Property<ulong>(
"RepositoryRights")
404 .HasColumnType(
"bigint unsigned");
408 b.HasIndex(
"InstanceId");
410 b.HasIndex(
"PermissionSetId",
"InstanceId")
413 b.ToTable(
"InstancePermissionSets");
416 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
418 b.Property<
long?>(
"Id")
419 .ValueGeneratedOnAdd()
420 .HasColumnType(
"bigint");
422 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long?>(
"Id"));
424 b.Property<ulong?>(
"CancelRight")
425 .HasColumnType(
"bigint unsigned");
427 b.Property<ulong?>(
"CancelRightsType")
428 .HasColumnType(
"bigint unsigned");
430 b.Property<
bool?>(
"Cancelled")
432 .HasColumnType(
"tinyint(1)");
434 b.Property<
long?>(
"CancelledById")
435 .HasColumnType(
"bigint");
437 b.Property<
string>(
"Description")
439 .HasColumnType(
"longtext");
441 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Description"),
"utf8mb4");
443 b.Property<uint?>(
"ErrorCode")
444 .HasColumnType(
"int unsigned");
446 b.Property<
string>(
"ExceptionDetails")
447 .HasColumnType(
"longtext");
449 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"ExceptionDetails"),
"utf8mb4");
451 b.Property<
long>(
"InstanceId")
452 .HasColumnType(
"bigint");
454 b.Property<
byte>(
"JobCode")
455 .HasColumnType(
"tinyint unsigned");
457 b.Property<DateTimeOffset?>(
"StartedAt")
459 .HasColumnType(
"datetime(6)");
461 b.Property<
long>(
"StartedById")
462 .HasColumnType(
"bigint");
464 b.Property<DateTimeOffset?>(
"StoppedAt")
465 .HasColumnType(
"datetime(6)");
469 b.HasIndex(
"CancelledById");
471 b.HasIndex(
"InstanceId");
473 b.HasIndex(
"StartedById");
478 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
480 b.Property<
long>(
"Id")
481 .ValueGeneratedOnAdd()
482 .HasColumnType(
"bigint");
484 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long>(
"Id"));
486 b.Property<
string>(
"ExternalUserId")
489 .HasColumnType(
"varchar(100)");
491 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"ExternalUserId"),
"utf8mb4");
493 b.Property<
int>(
"Provider")
494 .HasColumnType(
"int");
496 b.Property<
long?>(
"UserId")
497 .HasColumnType(
"bigint");
501 b.HasIndex(
"UserId");
503 b.HasIndex(
"Provider",
"ExternalUserId")
506 b.ToTable(
"OAuthConnections");
509 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
511 b.Property<
long?>(
"Id")
512 .ValueGeneratedOnAdd()
513 .HasColumnType(
"bigint");
515 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long?>(
"Id"));
517 b.Property<ulong>(
"AdministrationRights")
518 .HasColumnType(
"bigint unsigned");
520 b.Property<
long?>(
"GroupId")
521 .HasColumnType(
"bigint");
523 b.Property<ulong>(
"InstanceManagerRights")
524 .HasColumnType(
"bigint unsigned");
526 b.Property<
long?>(
"UserId")
527 .HasColumnType(
"bigint");
531 b.HasIndex(
"GroupId")
537 b.ToTable(
"PermissionSets");
540 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
542 b.Property<
long?>(
"Id")
543 .ValueGeneratedOnAdd()
544 .HasColumnType(
"bigint");
546 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long?>(
"Id"));
548 b.Property<
string>(
"AccessIdentifier")
550 .HasColumnType(
"longtext");
552 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"AccessIdentifier"),
"utf8mb4");
554 b.Property<
long>(
"CompileJobId")
555 .HasColumnType(
"bigint");
557 b.Property<
long?>(
"InitialCompileJobId")
558 .HasColumnType(
"bigint");
560 b.Property<
int>(
"LaunchSecurityLevel")
561 .HasColumnType(
"int");
563 b.Property<
int>(
"LaunchVisibility")
564 .HasColumnType(
"int");
566 b.Property<ushort>(
"Port")
567 .HasColumnType(
"smallint unsigned");
569 b.Property<
int>(
"ProcessId")
570 .HasColumnType(
"int");
572 b.Property<
int>(
"RebootState")
573 .HasColumnType(
"int");
575 b.Property<ushort?>(
"TopicPort")
576 .HasColumnType(
"smallint unsigned");
580 b.HasIndex(
"CompileJobId");
582 b.HasIndex(
"InitialCompileJobId");
584 b.ToTable(
"ReattachInformations");
587 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
589 b.Property<
long>(
"Id")
590 .ValueGeneratedOnAdd()
591 .HasColumnType(
"bigint");
593 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long>(
"Id"));
595 b.Property<
string>(
"AccessToken")
597 .HasColumnType(
"longtext");
599 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"AccessToken"),
"utf8mb4");
601 b.Property<
string>(
"AccessUser")
603 .HasColumnType(
"longtext");
605 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"AccessUser"),
"utf8mb4");
607 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
609 .HasColumnType(
"tinyint(1)");
611 b.Property<
bool?>(
"AutoUpdatesSynchronize")
613 .HasColumnType(
"tinyint(1)");
615 b.Property<
string>(
"CommitterEmail")
618 .HasColumnType(
"longtext");
620 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"CommitterEmail"),
"utf8mb4");
622 b.Property<
string>(
"CommitterName")
625 .HasColumnType(
"longtext");
627 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"CommitterName"),
"utf8mb4");
629 b.Property<
bool?>(
"CreateGitHubDeployments")
631 .HasColumnType(
"tinyint(1)");
633 b.Property<
long>(
"InstanceId")
634 .HasColumnType(
"bigint");
636 b.Property<
bool?>(
"PostTestMergeComment")
638 .HasColumnType(
"tinyint(1)");
640 b.Property<
bool?>(
"PushTestMergeCommits")
642 .HasColumnType(
"tinyint(1)");
644 b.Property<
bool?>(
"ShowTestMergeCommitters")
646 .HasColumnType(
"tinyint(1)");
648 b.Property<
bool?>(
"UpdateSubmodules")
650 .HasColumnType(
"tinyint(1)");
654 b.HasIndex(
"InstanceId")
657 b.ToTable(
"RepositorySettings");
660 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
662 b.Property<
long>(
"Id")
663 .ValueGeneratedOnAdd()
664 .HasColumnType(
"bigint");
666 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long>(
"Id"));
668 b.Property<
long>(
"RevisionInformationId")
669 .HasColumnType(
"bigint");
671 b.Property<
long>(
"TestMergeId")
672 .HasColumnType(
"bigint");
676 b.HasIndex(
"RevisionInformationId");
678 b.HasIndex(
"TestMergeId");
680 b.ToTable(
"RevInfoTestMerges");
683 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
685 b.Property<
long>(
"Id")
686 .ValueGeneratedOnAdd()
687 .HasColumnType(
"bigint");
689 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long>(
"Id"));
691 b.Property<
string>(
"CommitSha")
694 .HasColumnType(
"varchar(40)");
696 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"CommitSha"),
"utf8mb4");
698 b.Property<
long>(
"InstanceId")
699 .HasColumnType(
"bigint");
701 b.Property<
string>(
"OriginCommitSha")
704 .HasColumnType(
"varchar(40)");
706 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"OriginCommitSha"),
"utf8mb4");
708 b.Property<DateTimeOffset>(
"Timestamp")
709 .HasColumnType(
"datetime(6)");
713 b.HasIndex(
"InstanceId",
"CommitSha")
716 b.ToTable(
"RevisionInformations");
719 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
721 b.Property<
long>(
"Id")
722 .ValueGeneratedOnAdd()
723 .HasColumnType(
"bigint");
725 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long>(
"Id"));
727 b.Property<
string>(
"Author")
729 .HasColumnType(
"longtext");
731 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Author"),
"utf8mb4");
733 b.Property<
string>(
"BodyAtMerge")
735 .HasColumnType(
"longtext");
737 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"BodyAtMerge"),
"utf8mb4");
739 b.Property<
string>(
"Comment")
741 .HasColumnType(
"longtext");
743 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Comment"),
"utf8mb4");
745 b.Property<DateTimeOffset>(
"MergedAt")
746 .HasColumnType(
"datetime(6)");
748 b.Property<
long>(
"MergedById")
749 .HasColumnType(
"bigint");
751 b.Property<
int>(
"Number")
752 .HasColumnType(
"int");
754 b.Property<
long?>(
"PrimaryRevisionInformationId")
756 .HasColumnType(
"bigint");
758 b.Property<
string>(
"TargetCommitSha")
761 .HasColumnType(
"varchar(40)");
763 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"TargetCommitSha"),
"utf8mb4");
765 b.Property<
string>(
"TitleAtMerge")
767 .HasColumnType(
"longtext");
769 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"TitleAtMerge"),
"utf8mb4");
771 b.Property<
string>(
"Url")
773 .HasColumnType(
"longtext");
775 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Url"),
"utf8mb4");
779 b.HasIndex(
"MergedById");
781 b.HasIndex(
"PrimaryRevisionInformationId")
784 b.ToTable(
"TestMerges");
787 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
789 b.Property<
long?>(
"Id")
790 .ValueGeneratedOnAdd()
791 .HasColumnType(
"bigint");
793 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long?>(
"Id"));
795 b.Property<
string>(
"CanonicalName")
798 .HasColumnType(
"varchar(100)");
800 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"CanonicalName"),
"utf8mb4");
802 b.Property<DateTimeOffset?>(
"CreatedAt")
804 .HasColumnType(
"datetime(6)");
806 b.Property<
long?>(
"CreatedById")
807 .HasColumnType(
"bigint");
809 b.Property<
bool?>(
"Enabled")
811 .HasColumnType(
"tinyint(1)");
813 b.Property<
long?>(
"GroupId")
814 .HasColumnType(
"bigint");
816 b.Property<DateTimeOffset?>(
"LastPasswordUpdate")
817 .HasColumnType(
"datetime(6)");
819 b.Property<
string>(
"Name")
822 .HasColumnType(
"varchar(100)");
824 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Name"),
"utf8mb4");
826 b.Property<
string>(
"PasswordHash")
827 .HasColumnType(
"longtext");
829 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"PasswordHash"),
"utf8mb4");
831 b.Property<
string>(
"SystemIdentifier")
833 .HasColumnType(
"varchar(100)");
835 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"SystemIdentifier"),
"utf8mb4");
839 b.HasIndex(
"CanonicalName")
842 b.HasIndex(
"CreatedById");
844 b.HasIndex(
"GroupId");
846 b.HasIndex(
"SystemIdentifier")
852 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
854 b.Property<
long?>(
"Id")
855 .ValueGeneratedOnAdd()
856 .HasColumnType(
"bigint");
858 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long?>(
"Id"));
860 b.Property<
string>(
"Name")
863 .HasColumnType(
"varchar(100)");
865 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Name"),
"utf8mb4");
875 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
877 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
878 .WithMany(
"ChatSettings")
879 .HasForeignKey(
"InstanceId")
880 .OnDelete(DeleteBehavior.Cascade)
883 b.Navigation(
"Instance");
886 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
888 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
889 .WithMany(
"Channels")
890 .HasForeignKey(
"ChatSettingsId")
891 .OnDelete(DeleteBehavior.Cascade)
894 b.Navigation(
"ChatSettings");
897 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
899 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
901 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
902 .OnDelete(DeleteBehavior.Cascade)
905 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
906 .WithMany(
"CompileJobs")
907 .HasForeignKey(
"RevisionInformationId")
908 .OnDelete(DeleteBehavior.Cascade)
913 b.Navigation(
"RevisionInformation");
916 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
918 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
919 .WithOne(
"DreamDaemonSettings")
920 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
921 .OnDelete(DeleteBehavior.Cascade)
924 b.Navigation(
"Instance");
927 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
929 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
930 .WithOne(
"DreamMakerSettings")
931 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
932 .OnDelete(DeleteBehavior.Cascade)
935 b.Navigation(
"Instance");
938 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
940 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
941 .WithMany(
"InstancePermissionSets")
942 .HasForeignKey(
"InstanceId")
943 .OnDelete(DeleteBehavior.Cascade)
946 b.HasOne(
"Tgstation.Server.Host.Models.PermissionSet",
"PermissionSet")
947 .WithMany(
"InstancePermissionSets")
948 .HasForeignKey(
"PermissionSetId")
949 .OnDelete(DeleteBehavior.Cascade)
952 b.Navigation(
"Instance");
954 b.Navigation(
"PermissionSet");
957 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
959 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
961 .HasForeignKey(
"CancelledById");
963 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
965 .HasForeignKey(
"InstanceId")
966 .OnDelete(DeleteBehavior.Cascade)
969 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
971 .HasForeignKey(
"StartedById")
972 .OnDelete(DeleteBehavior.Cascade)
975 b.Navigation(
"CancelledBy");
977 b.Navigation(
"Instance");
979 b.Navigation(
"StartedBy");
982 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
984 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
985 .WithMany(
"OAuthConnections")
986 .HasForeignKey(
"UserId")
987 .OnDelete(DeleteBehavior.Cascade);
989 b.Navigation(
"User");
992 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
994 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
995 .WithOne(
"PermissionSet")
996 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"GroupId")
997 .OnDelete(DeleteBehavior.Cascade);
999 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
1000 .WithOne(
"PermissionSet")
1001 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"UserId")
1002 .OnDelete(DeleteBehavior.Cascade);
1004 b.Navigation(
"Group");
1006 b.Navigation(
"User");
1009 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
1011 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
1013 .HasForeignKey(
"CompileJobId")
1014 .OnDelete(DeleteBehavior.Cascade)
1017 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"InitialCompileJob")
1019 .HasForeignKey(
"InitialCompileJobId");
1021 b.Navigation(
"CompileJob");
1023 b.Navigation(
"InitialCompileJob");
1026 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
1028 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
1029 .WithOne(
"RepositorySettings")
1030 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
1031 .OnDelete(DeleteBehavior.Cascade)
1034 b.Navigation(
"Instance");
1037 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
1039 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
1040 .WithMany(
"ActiveTestMerges")
1041 .HasForeignKey(
"RevisionInformationId")
1042 .OnDelete(DeleteBehavior.Cascade)
1045 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
1046 .WithMany(
"RevisonInformations")
1047 .HasForeignKey(
"TestMergeId")
1048 .OnDelete(DeleteBehavior.ClientNoAction)
1051 b.Navigation(
"RevisionInformation");
1053 b.Navigation(
"TestMerge");
1056 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
1058 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
1059 .WithMany(
"RevisionInformations")
1060 .HasForeignKey(
"InstanceId")
1061 .OnDelete(DeleteBehavior.Cascade)
1064 b.Navigation(
"Instance");
1067 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
1069 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
1070 .WithMany(
"TestMerges")
1071 .HasForeignKey(
"MergedById")
1072 .OnDelete(DeleteBehavior.Restrict)
1075 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
1076 .WithOne(
"PrimaryTestMerge")
1077 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
1078 .OnDelete(DeleteBehavior.Cascade)
1081 b.Navigation(
"MergedBy");
1083 b.Navigation(
"PrimaryRevisionInformation");
1086 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
1088 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
1089 .WithMany(
"CreatedUsers")
1090 .HasForeignKey(
"CreatedById");
1092 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
1094 .HasForeignKey(
"GroupId");
1096 b.Navigation(
"CreatedBy");
1098 b.Navigation(
"Group");
1101 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
1103 b.Navigation(
"Channels");
1106 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
1108 b.Navigation(
"ChatSettings");
1110 b.Navigation(
"DreamDaemonSettings");
1112 b.Navigation(
"DreamMakerSettings");
1114 b.Navigation(
"InstancePermissionSets");
1116 b.Navigation(
"Jobs");
1118 b.Navigation(
"RepositorySettings");
1120 b.Navigation(
"RevisionInformations");
1123 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
1125 b.Navigation(
"InstancePermissionSets");
1128 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
1130 b.Navigation(
"ActiveTestMerges");
1132 b.Navigation(
"CompileJobs");
1134 b.Navigation(
"PrimaryTestMerge");
1137 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
1139 b.Navigation(
"RevisonInformations");
1142 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
1144 b.Navigation(
"CreatedUsers");
1146 b.Navigation(
"OAuthConnections");
1148 b.Navigation(
"PermissionSet");
1150 b.Navigation(
"TestMerges");
1153 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
1155 b.Navigation(
"PermissionSet")
1158 b.Navigation(
"Users");
1160#pragma warning restore 612, 618