17#pragma warning disable 612, 618
19 .HasAnnotation(
"ProductVersion",
"8.0.8")
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<
int>(
"DMApiValidationMode")
293 .HasColumnType(
"int");
295 b.Property<
long>(
"InstanceId")
296 .HasColumnType(
"bigint");
298 b.Property<
string>(
"ProjectName")
300 .HasColumnType(
"longtext");
302 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"ProjectName"),
"utf8mb4");
304 b.Property<TimeSpan?>(
"Timeout")
306 .HasColumnType(
"time(6)");
310 b.HasIndex(
"InstanceId")
313 b.ToTable(
"DreamMakerSettings");
316 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
318 b.Property<
long?>(
"Id")
319 .ValueGeneratedOnAdd()
320 .HasColumnType(
"bigint");
322 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long?>(
"Id"));
324 b.Property<
string>(
"AutoUpdateCron")
327 .HasColumnType(
"varchar(10000)");
329 b.Property<uint?>(
"AutoUpdateInterval")
331 .HasColumnType(
"int unsigned");
333 b.Property<ushort?>(
"ChatBotLimit")
335 .HasColumnType(
"smallint unsigned");
337 b.Property<
int>(
"ConfigurationType")
338 .HasColumnType(
"int");
340 b.Property<
string>(
"Name")
343 .HasColumnType(
"varchar(100)");
345 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Name"),
"utf8mb4");
347 b.Property<
bool?>(
"Online")
349 .HasColumnType(
"tinyint(1)");
351 b.Property<
string>(
"Path")
353 .HasColumnType(
"varchar(255)");
355 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Path"),
"utf8mb4");
357 b.Property<
string>(
"SwarmIdentifer")
358 .HasColumnType(
"varchar(255)");
360 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"SwarmIdentifer"),
"utf8mb4");
364 b.HasIndex(
"Path",
"SwarmIdentifer")
367 b.ToTable(
"Instances");
370 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
372 b.Property<
long>(
"Id")
373 .ValueGeneratedOnAdd()
374 .HasColumnType(
"bigint");
376 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long>(
"Id"));
378 b.Property<ulong>(
"ChatBotRights")
379 .HasColumnType(
"bigint unsigned");
381 b.Property<ulong>(
"ConfigurationRights")
382 .HasColumnType(
"bigint unsigned");
384 b.Property<ulong>(
"DreamDaemonRights")
385 .HasColumnType(
"bigint unsigned");
387 b.Property<ulong>(
"DreamMakerRights")
388 .HasColumnType(
"bigint unsigned");
390 b.Property<ulong>(
"EngineRights")
391 .HasColumnType(
"bigint unsigned");
393 b.Property<
long>(
"InstanceId")
394 .HasColumnType(
"bigint");
396 b.Property<ulong>(
"InstancePermissionSetRights")
397 .HasColumnType(
"bigint unsigned");
399 b.Property<
long>(
"PermissionSetId")
400 .HasColumnType(
"bigint");
402 b.Property<ulong>(
"RepositoryRights")
403 .HasColumnType(
"bigint unsigned");
407 b.HasIndex(
"InstanceId");
409 b.HasIndex(
"PermissionSetId",
"InstanceId")
412 b.ToTable(
"InstancePermissionSets");
415 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
417 b.Property<
long?>(
"Id")
418 .ValueGeneratedOnAdd()
419 .HasColumnType(
"bigint");
421 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long?>(
"Id"));
423 b.Property<ulong?>(
"CancelRight")
424 .HasColumnType(
"bigint unsigned");
426 b.Property<ulong?>(
"CancelRightsType")
427 .HasColumnType(
"bigint unsigned");
429 b.Property<
bool?>(
"Cancelled")
431 .HasColumnType(
"tinyint(1)");
433 b.Property<
long?>(
"CancelledById")
434 .HasColumnType(
"bigint");
436 b.Property<
string>(
"Description")
438 .HasColumnType(
"longtext");
440 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Description"),
"utf8mb4");
442 b.Property<uint?>(
"ErrorCode")
443 .HasColumnType(
"int unsigned");
445 b.Property<
string>(
"ExceptionDetails")
446 .HasColumnType(
"longtext");
448 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"ExceptionDetails"),
"utf8mb4");
450 b.Property<
long>(
"InstanceId")
451 .HasColumnType(
"bigint");
453 b.Property<
byte>(
"JobCode")
454 .HasColumnType(
"tinyint unsigned");
456 b.Property<DateTimeOffset?>(
"StartedAt")
458 .HasColumnType(
"datetime(6)");
460 b.Property<
long>(
"StartedById")
461 .HasColumnType(
"bigint");
463 b.Property<DateTimeOffset?>(
"StoppedAt")
464 .HasColumnType(
"datetime(6)");
468 b.HasIndex(
"CancelledById");
470 b.HasIndex(
"InstanceId");
472 b.HasIndex(
"StartedById");
477 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
479 b.Property<
long>(
"Id")
480 .ValueGeneratedOnAdd()
481 .HasColumnType(
"bigint");
483 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long>(
"Id"));
485 b.Property<
string>(
"ExternalUserId")
488 .HasColumnType(
"varchar(100)");
490 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"ExternalUserId"),
"utf8mb4");
492 b.Property<
int>(
"Provider")
493 .HasColumnType(
"int");
495 b.Property<
long?>(
"UserId")
496 .HasColumnType(
"bigint");
500 b.HasIndex(
"UserId");
502 b.HasIndex(
"Provider",
"ExternalUserId")
505 b.ToTable(
"OAuthConnections");
508 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
510 b.Property<
long?>(
"Id")
511 .ValueGeneratedOnAdd()
512 .HasColumnType(
"bigint");
514 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long?>(
"Id"));
516 b.Property<ulong>(
"AdministrationRights")
517 .HasColumnType(
"bigint unsigned");
519 b.Property<
long?>(
"GroupId")
520 .HasColumnType(
"bigint");
522 b.Property<ulong>(
"InstanceManagerRights")
523 .HasColumnType(
"bigint unsigned");
525 b.Property<
long?>(
"UserId")
526 .HasColumnType(
"bigint");
530 b.HasIndex(
"GroupId")
536 b.ToTable(
"PermissionSets");
539 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
541 b.Property<
long?>(
"Id")
542 .ValueGeneratedOnAdd()
543 .HasColumnType(
"bigint");
545 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long?>(
"Id"));
547 b.Property<
string>(
"AccessIdentifier")
549 .HasColumnType(
"longtext");
551 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"AccessIdentifier"),
"utf8mb4");
553 b.Property<
long>(
"CompileJobId")
554 .HasColumnType(
"bigint");
556 b.Property<
long?>(
"InitialCompileJobId")
557 .HasColumnType(
"bigint");
559 b.Property<
int>(
"LaunchSecurityLevel")
560 .HasColumnType(
"int");
562 b.Property<
int>(
"LaunchVisibility")
563 .HasColumnType(
"int");
565 b.Property<ushort>(
"Port")
566 .HasColumnType(
"smallint unsigned");
568 b.Property<
int>(
"ProcessId")
569 .HasColumnType(
"int");
571 b.Property<
int>(
"RebootState")
572 .HasColumnType(
"int");
574 b.Property<ushort?>(
"TopicPort")
575 .HasColumnType(
"smallint unsigned");
579 b.HasIndex(
"CompileJobId");
581 b.HasIndex(
"InitialCompileJobId");
583 b.ToTable(
"ReattachInformations");
586 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
588 b.Property<
long>(
"Id")
589 .ValueGeneratedOnAdd()
590 .HasColumnType(
"bigint");
592 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long>(
"Id"));
594 b.Property<
string>(
"AccessToken")
596 .HasColumnType(
"longtext");
598 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"AccessToken"),
"utf8mb4");
600 b.Property<
string>(
"AccessUser")
602 .HasColumnType(
"longtext");
604 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"AccessUser"),
"utf8mb4");
606 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
608 .HasColumnType(
"tinyint(1)");
610 b.Property<
bool?>(
"AutoUpdatesSynchronize")
612 .HasColumnType(
"tinyint(1)");
614 b.Property<
string>(
"CommitterEmail")
617 .HasColumnType(
"longtext");
619 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"CommitterEmail"),
"utf8mb4");
621 b.Property<
string>(
"CommitterName")
624 .HasColumnType(
"longtext");
626 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"CommitterName"),
"utf8mb4");
628 b.Property<
bool?>(
"CreateGitHubDeployments")
630 .HasColumnType(
"tinyint(1)");
632 b.Property<
long>(
"InstanceId")
633 .HasColumnType(
"bigint");
635 b.Property<
bool?>(
"PostTestMergeComment")
637 .HasColumnType(
"tinyint(1)");
639 b.Property<
bool?>(
"PushTestMergeCommits")
641 .HasColumnType(
"tinyint(1)");
643 b.Property<
bool?>(
"ShowTestMergeCommitters")
645 .HasColumnType(
"tinyint(1)");
647 b.Property<
bool?>(
"UpdateSubmodules")
649 .HasColumnType(
"tinyint(1)");
653 b.HasIndex(
"InstanceId")
656 b.ToTable(
"RepositorySettings");
659 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
661 b.Property<
long>(
"Id")
662 .ValueGeneratedOnAdd()
663 .HasColumnType(
"bigint");
665 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long>(
"Id"));
667 b.Property<
long>(
"RevisionInformationId")
668 .HasColumnType(
"bigint");
670 b.Property<
long>(
"TestMergeId")
671 .HasColumnType(
"bigint");
675 b.HasIndex(
"RevisionInformationId");
677 b.HasIndex(
"TestMergeId");
679 b.ToTable(
"RevInfoTestMerges");
682 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
684 b.Property<
long>(
"Id")
685 .ValueGeneratedOnAdd()
686 .HasColumnType(
"bigint");
688 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long>(
"Id"));
690 b.Property<
string>(
"CommitSha")
693 .HasColumnType(
"varchar(40)");
695 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"CommitSha"),
"utf8mb4");
697 b.Property<
long>(
"InstanceId")
698 .HasColumnType(
"bigint");
700 b.Property<
string>(
"OriginCommitSha")
703 .HasColumnType(
"varchar(40)");
705 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"OriginCommitSha"),
"utf8mb4");
707 b.Property<DateTimeOffset>(
"Timestamp")
708 .HasColumnType(
"datetime(6)");
712 b.HasIndex(
"InstanceId",
"CommitSha")
715 b.ToTable(
"RevisionInformations");
718 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
720 b.Property<
long>(
"Id")
721 .ValueGeneratedOnAdd()
722 .HasColumnType(
"bigint");
724 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long>(
"Id"));
726 b.Property<
string>(
"Author")
728 .HasColumnType(
"longtext");
730 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Author"),
"utf8mb4");
732 b.Property<
string>(
"BodyAtMerge")
734 .HasColumnType(
"longtext");
736 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"BodyAtMerge"),
"utf8mb4");
738 b.Property<
string>(
"Comment")
740 .HasColumnType(
"longtext");
742 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Comment"),
"utf8mb4");
744 b.Property<DateTimeOffset>(
"MergedAt")
745 .HasColumnType(
"datetime(6)");
747 b.Property<
long>(
"MergedById")
748 .HasColumnType(
"bigint");
750 b.Property<
int>(
"Number")
751 .HasColumnType(
"int");
753 b.Property<
long?>(
"PrimaryRevisionInformationId")
755 .HasColumnType(
"bigint");
757 b.Property<
string>(
"TargetCommitSha")
760 .HasColumnType(
"varchar(40)");
762 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"TargetCommitSha"),
"utf8mb4");
764 b.Property<
string>(
"TitleAtMerge")
766 .HasColumnType(
"longtext");
768 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"TitleAtMerge"),
"utf8mb4");
770 b.Property<
string>(
"Url")
772 .HasColumnType(
"longtext");
774 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Url"),
"utf8mb4");
778 b.HasIndex(
"MergedById");
780 b.HasIndex(
"PrimaryRevisionInformationId")
783 b.ToTable(
"TestMerges");
786 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
788 b.Property<
long?>(
"Id")
789 .ValueGeneratedOnAdd()
790 .HasColumnType(
"bigint");
792 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long?>(
"Id"));
794 b.Property<
string>(
"CanonicalName")
797 .HasColumnType(
"varchar(100)");
799 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"CanonicalName"),
"utf8mb4");
801 b.Property<DateTimeOffset?>(
"CreatedAt")
803 .HasColumnType(
"datetime(6)");
805 b.Property<
long?>(
"CreatedById")
806 .HasColumnType(
"bigint");
808 b.Property<
bool?>(
"Enabled")
810 .HasColumnType(
"tinyint(1)");
812 b.Property<
long?>(
"GroupId")
813 .HasColumnType(
"bigint");
815 b.Property<DateTimeOffset?>(
"LastPasswordUpdate")
816 .HasColumnType(
"datetime(6)");
818 b.Property<
string>(
"Name")
821 .HasColumnType(
"varchar(100)");
823 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Name"),
"utf8mb4");
825 b.Property<
string>(
"PasswordHash")
826 .HasColumnType(
"longtext");
828 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"PasswordHash"),
"utf8mb4");
830 b.Property<
string>(
"SystemIdentifier")
832 .HasColumnType(
"varchar(100)");
834 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"SystemIdentifier"),
"utf8mb4");
838 b.HasIndex(
"CanonicalName")
841 b.HasIndex(
"CreatedById");
843 b.HasIndex(
"GroupId");
845 b.HasIndex(
"SystemIdentifier")
851 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
853 b.Property<
long?>(
"Id")
854 .ValueGeneratedOnAdd()
855 .HasColumnType(
"bigint");
857 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long?>(
"Id"));
859 b.Property<
string>(
"Name")
862 .HasColumnType(
"varchar(100)");
864 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Name"),
"utf8mb4");
874 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
876 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
877 .WithMany(
"ChatSettings")
878 .HasForeignKey(
"InstanceId")
879 .OnDelete(DeleteBehavior.Cascade)
882 b.Navigation(
"Instance");
885 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
887 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
888 .WithMany(
"Channels")
889 .HasForeignKey(
"ChatSettingsId")
890 .OnDelete(DeleteBehavior.Cascade)
893 b.Navigation(
"ChatSettings");
896 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
898 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
900 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
901 .OnDelete(DeleteBehavior.Cascade)
904 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
905 .WithMany(
"CompileJobs")
906 .HasForeignKey(
"RevisionInformationId")
907 .OnDelete(DeleteBehavior.Cascade)
912 b.Navigation(
"RevisionInformation");
915 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
917 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
918 .WithOne(
"DreamDaemonSettings")
919 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
920 .OnDelete(DeleteBehavior.Cascade)
923 b.Navigation(
"Instance");
926 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
928 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
929 .WithOne(
"DreamMakerSettings")
930 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
931 .OnDelete(DeleteBehavior.Cascade)
934 b.Navigation(
"Instance");
937 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
939 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
940 .WithMany(
"InstancePermissionSets")
941 .HasForeignKey(
"InstanceId")
942 .OnDelete(DeleteBehavior.Cascade)
945 b.HasOne(
"Tgstation.Server.Host.Models.PermissionSet",
"PermissionSet")
946 .WithMany(
"InstancePermissionSets")
947 .HasForeignKey(
"PermissionSetId")
948 .OnDelete(DeleteBehavior.Cascade)
951 b.Navigation(
"Instance");
953 b.Navigation(
"PermissionSet");
956 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
958 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
960 .HasForeignKey(
"CancelledById");
962 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
964 .HasForeignKey(
"InstanceId")
965 .OnDelete(DeleteBehavior.Cascade)
968 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
970 .HasForeignKey(
"StartedById")
971 .OnDelete(DeleteBehavior.Cascade)
974 b.Navigation(
"CancelledBy");
976 b.Navigation(
"Instance");
978 b.Navigation(
"StartedBy");
981 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
983 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
984 .WithMany(
"OAuthConnections")
985 .HasForeignKey(
"UserId")
986 .OnDelete(DeleteBehavior.Cascade);
988 b.Navigation(
"User");
991 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
993 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
994 .WithOne(
"PermissionSet")
995 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"GroupId")
996 .OnDelete(DeleteBehavior.Cascade);
998 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
999 .WithOne(
"PermissionSet")
1000 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"UserId")
1001 .OnDelete(DeleteBehavior.Cascade);
1003 b.Navigation(
"Group");
1005 b.Navigation(
"User");
1008 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
1010 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
1012 .HasForeignKey(
"CompileJobId")
1013 .OnDelete(DeleteBehavior.Cascade)
1016 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"InitialCompileJob")
1018 .HasForeignKey(
"InitialCompileJobId");
1020 b.Navigation(
"CompileJob");
1022 b.Navigation(
"InitialCompileJob");
1025 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
1027 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
1028 .WithOne(
"RepositorySettings")
1029 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
1030 .OnDelete(DeleteBehavior.Cascade)
1033 b.Navigation(
"Instance");
1036 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
1038 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
1039 .WithMany(
"ActiveTestMerges")
1040 .HasForeignKey(
"RevisionInformationId")
1041 .OnDelete(DeleteBehavior.Cascade)
1044 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
1045 .WithMany(
"RevisonInformations")
1046 .HasForeignKey(
"TestMergeId")
1047 .OnDelete(DeleteBehavior.ClientNoAction)
1050 b.Navigation(
"RevisionInformation");
1052 b.Navigation(
"TestMerge");
1055 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
1057 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
1058 .WithMany(
"RevisionInformations")
1059 .HasForeignKey(
"InstanceId")
1060 .OnDelete(DeleteBehavior.Cascade)
1063 b.Navigation(
"Instance");
1066 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
1068 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
1069 .WithMany(
"TestMerges")
1070 .HasForeignKey(
"MergedById")
1071 .OnDelete(DeleteBehavior.Restrict)
1074 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
1075 .WithOne(
"PrimaryTestMerge")
1076 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
1077 .OnDelete(DeleteBehavior.Cascade)
1080 b.Navigation(
"MergedBy");
1082 b.Navigation(
"PrimaryRevisionInformation");
1085 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
1087 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
1088 .WithMany(
"CreatedUsers")
1089 .HasForeignKey(
"CreatedById");
1091 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
1093 .HasForeignKey(
"GroupId");
1095 b.Navigation(
"CreatedBy");
1097 b.Navigation(
"Group");
1100 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
1102 b.Navigation(
"Channels");
1105 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
1107 b.Navigation(
"ChatSettings");
1109 b.Navigation(
"DreamDaemonSettings");
1111 b.Navigation(
"DreamMakerSettings");
1113 b.Navigation(
"InstancePermissionSets");
1115 b.Navigation(
"Jobs");
1117 b.Navigation(
"RepositorySettings");
1119 b.Navigation(
"RevisionInformations");
1122 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
1124 b.Navigation(
"InstancePermissionSets");
1127 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
1129 b.Navigation(
"ActiveTestMerges");
1131 b.Navigation(
"CompileJobs");
1133 b.Navigation(
"PrimaryTestMerge");
1136 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
1138 b.Navigation(
"RevisonInformations");
1141 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
1143 b.Navigation(
"CreatedUsers");
1145 b.Navigation(
"OAuthConnections");
1147 b.Navigation(
"PermissionSet");
1149 b.Navigation(
"TestMerges");
1152 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
1154 b.Navigation(
"PermissionSet")
1157 b.Navigation(
"Users");
1159#pragma warning restore 612, 618