17#pragma warning disable 612, 618
19 .HasAnnotation(
"ProductVersion",
"8.0.10")
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>(
"AutoStartCron")
327 .HasColumnType(
"varchar(1000)");
329 b.Property<
string>(
"AutoStopCron")
332 .HasColumnType(
"varchar(1000)");
334 b.Property<
string>(
"AutoUpdateCron")
337 .HasColumnType(
"varchar(1000)");
339 b.Property<uint?>(
"AutoUpdateInterval")
341 .HasColumnType(
"int unsigned");
343 b.Property<ushort?>(
"ChatBotLimit")
345 .HasColumnType(
"smallint unsigned");
347 b.Property<
int>(
"ConfigurationType")
348 .HasColumnType(
"int");
350 b.Property<
string>(
"Name")
353 .HasColumnType(
"varchar(100)");
355 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Name"),
"utf8mb4");
357 b.Property<
bool?>(
"Online")
359 .HasColumnType(
"tinyint(1)");
361 b.Property<
string>(
"Path")
363 .HasColumnType(
"varchar(255)");
365 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Path"),
"utf8mb4");
367 b.Property<
string>(
"SwarmIdentifer")
368 .HasColumnType(
"varchar(255)");
370 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"SwarmIdentifer"),
"utf8mb4");
374 b.HasIndex(
"Path",
"SwarmIdentifer")
377 b.ToTable(
"Instances");
380 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
382 b.Property<
long>(
"Id")
383 .ValueGeneratedOnAdd()
384 .HasColumnType(
"bigint");
386 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long>(
"Id"));
388 b.Property<ulong>(
"ChatBotRights")
389 .HasColumnType(
"bigint unsigned");
391 b.Property<ulong>(
"ConfigurationRights")
392 .HasColumnType(
"bigint unsigned");
394 b.Property<ulong>(
"DreamDaemonRights")
395 .HasColumnType(
"bigint unsigned");
397 b.Property<ulong>(
"DreamMakerRights")
398 .HasColumnType(
"bigint unsigned");
400 b.Property<ulong>(
"EngineRights")
401 .HasColumnType(
"bigint unsigned");
403 b.Property<
long>(
"InstanceId")
404 .HasColumnType(
"bigint");
406 b.Property<ulong>(
"InstancePermissionSetRights")
407 .HasColumnType(
"bigint unsigned");
409 b.Property<
long>(
"PermissionSetId")
410 .HasColumnType(
"bigint");
412 b.Property<ulong>(
"RepositoryRights")
413 .HasColumnType(
"bigint unsigned");
417 b.HasIndex(
"InstanceId");
419 b.HasIndex(
"PermissionSetId",
"InstanceId")
422 b.ToTable(
"InstancePermissionSets");
425 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
427 b.Property<
long?>(
"Id")
428 .ValueGeneratedOnAdd()
429 .HasColumnType(
"bigint");
431 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long?>(
"Id"));
433 b.Property<ulong?>(
"CancelRight")
434 .HasColumnType(
"bigint unsigned");
436 b.Property<ulong?>(
"CancelRightsType")
437 .HasColumnType(
"bigint unsigned");
439 b.Property<
bool?>(
"Cancelled")
441 .HasColumnType(
"tinyint(1)");
443 b.Property<
long?>(
"CancelledById")
444 .HasColumnType(
"bigint");
446 b.Property<
string>(
"Description")
448 .HasColumnType(
"longtext");
450 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Description"),
"utf8mb4");
452 b.Property<uint?>(
"ErrorCode")
453 .HasColumnType(
"int unsigned");
455 b.Property<
string>(
"ExceptionDetails")
456 .HasColumnType(
"longtext");
458 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"ExceptionDetails"),
"utf8mb4");
460 b.Property<
long>(
"InstanceId")
461 .HasColumnType(
"bigint");
463 b.Property<
byte>(
"JobCode")
464 .HasColumnType(
"tinyint unsigned");
466 b.Property<DateTimeOffset?>(
"StartedAt")
468 .HasColumnType(
"datetime(6)");
470 b.Property<
long>(
"StartedById")
471 .HasColumnType(
"bigint");
473 b.Property<DateTimeOffset?>(
"StoppedAt")
474 .HasColumnType(
"datetime(6)");
478 b.HasIndex(
"CancelledById");
480 b.HasIndex(
"InstanceId");
482 b.HasIndex(
"StartedById");
487 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
489 b.Property<
long>(
"Id")
490 .ValueGeneratedOnAdd()
491 .HasColumnType(
"bigint");
493 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long>(
"Id"));
495 b.Property<
string>(
"ExternalUserId")
498 .HasColumnType(
"varchar(100)");
500 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"ExternalUserId"),
"utf8mb4");
502 b.Property<
int>(
"Provider")
503 .HasColumnType(
"int");
505 b.Property<
long>(
"UserId")
506 .HasColumnType(
"bigint");
510 b.HasIndex(
"UserId");
512 b.HasIndex(
"Provider",
"ExternalUserId")
515 b.ToTable(
"OAuthConnections");
518 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
520 b.Property<
long?>(
"Id")
521 .ValueGeneratedOnAdd()
522 .HasColumnType(
"bigint");
524 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long?>(
"Id"));
526 b.Property<ulong>(
"AdministrationRights")
527 .HasColumnType(
"bigint unsigned");
529 b.Property<
long?>(
"GroupId")
530 .HasColumnType(
"bigint");
532 b.Property<ulong>(
"InstanceManagerRights")
533 .HasColumnType(
"bigint unsigned");
535 b.Property<
long?>(
"UserId")
536 .HasColumnType(
"bigint");
540 b.HasIndex(
"GroupId")
546 b.ToTable(
"PermissionSets");
549 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
551 b.Property<
long?>(
"Id")
552 .ValueGeneratedOnAdd()
553 .HasColumnType(
"bigint");
555 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long?>(
"Id"));
557 b.Property<
string>(
"AccessIdentifier")
559 .HasColumnType(
"longtext");
561 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"AccessIdentifier"),
"utf8mb4");
563 b.Property<
long>(
"CompileJobId")
564 .HasColumnType(
"bigint");
566 b.Property<
long?>(
"InitialCompileJobId")
567 .HasColumnType(
"bigint");
569 b.Property<
int>(
"LaunchSecurityLevel")
570 .HasColumnType(
"int");
572 b.Property<
int>(
"LaunchVisibility")
573 .HasColumnType(
"int");
575 b.Property<ushort>(
"Port")
576 .HasColumnType(
"smallint unsigned");
578 b.Property<
int>(
"ProcessId")
579 .HasColumnType(
"int");
581 b.Property<
int>(
"RebootState")
582 .HasColumnType(
"int");
584 b.Property<ushort?>(
"TopicPort")
585 .HasColumnType(
"smallint unsigned");
589 b.HasIndex(
"CompileJobId");
591 b.HasIndex(
"InitialCompileJobId");
593 b.ToTable(
"ReattachInformations");
596 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
598 b.Property<
long>(
"Id")
599 .ValueGeneratedOnAdd()
600 .HasColumnType(
"bigint");
602 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long>(
"Id"));
604 b.Property<
string>(
"AccessToken")
606 .HasColumnType(
"longtext");
608 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"AccessToken"),
"utf8mb4");
610 b.Property<
string>(
"AccessUser")
612 .HasColumnType(
"longtext");
614 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"AccessUser"),
"utf8mb4");
616 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
618 .HasColumnType(
"tinyint(1)");
620 b.Property<
bool?>(
"AutoUpdatesSynchronize")
622 .HasColumnType(
"tinyint(1)");
624 b.Property<
string>(
"CommitterEmail")
627 .HasColumnType(
"longtext");
629 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"CommitterEmail"),
"utf8mb4");
631 b.Property<
string>(
"CommitterName")
634 .HasColumnType(
"longtext");
636 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"CommitterName"),
"utf8mb4");
638 b.Property<
bool?>(
"CreateGitHubDeployments")
640 .HasColumnType(
"tinyint(1)");
642 b.Property<
long>(
"InstanceId")
643 .HasColumnType(
"bigint");
645 b.Property<
bool?>(
"PostTestMergeComment")
647 .HasColumnType(
"tinyint(1)");
649 b.Property<
bool?>(
"PushTestMergeCommits")
651 .HasColumnType(
"tinyint(1)");
653 b.Property<
bool?>(
"ShowTestMergeCommitters")
655 .HasColumnType(
"tinyint(1)");
657 b.Property<
bool?>(
"UpdateSubmodules")
659 .HasColumnType(
"tinyint(1)");
663 b.HasIndex(
"InstanceId")
666 b.ToTable(
"RepositorySettings");
669 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
671 b.Property<
long>(
"Id")
672 .ValueGeneratedOnAdd()
673 .HasColumnType(
"bigint");
675 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long>(
"Id"));
677 b.Property<
long>(
"RevisionInformationId")
678 .HasColumnType(
"bigint");
680 b.Property<
long>(
"TestMergeId")
681 .HasColumnType(
"bigint");
685 b.HasIndex(
"RevisionInformationId");
687 b.HasIndex(
"TestMergeId");
689 b.ToTable(
"RevInfoTestMerges");
692 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
694 b.Property<
long>(
"Id")
695 .ValueGeneratedOnAdd()
696 .HasColumnType(
"bigint");
698 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long>(
"Id"));
700 b.Property<
string>(
"CommitSha")
703 .HasColumnType(
"varchar(40)");
705 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"CommitSha"),
"utf8mb4");
707 b.Property<
long>(
"InstanceId")
708 .HasColumnType(
"bigint");
710 b.Property<
string>(
"OriginCommitSha")
713 .HasColumnType(
"varchar(40)");
715 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"OriginCommitSha"),
"utf8mb4");
717 b.Property<DateTimeOffset>(
"Timestamp")
718 .HasColumnType(
"datetime(6)");
722 b.HasIndex(
"InstanceId",
"CommitSha")
725 b.ToTable(
"RevisionInformations");
728 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
730 b.Property<
long>(
"Id")
731 .ValueGeneratedOnAdd()
732 .HasColumnType(
"bigint");
734 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long>(
"Id"));
736 b.Property<
string>(
"Author")
738 .HasColumnType(
"longtext");
740 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Author"),
"utf8mb4");
742 b.Property<
string>(
"BodyAtMerge")
744 .HasColumnType(
"longtext");
746 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"BodyAtMerge"),
"utf8mb4");
748 b.Property<
string>(
"Comment")
750 .HasColumnType(
"longtext");
752 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Comment"),
"utf8mb4");
754 b.Property<DateTimeOffset>(
"MergedAt")
755 .HasColumnType(
"datetime(6)");
757 b.Property<
long>(
"MergedById")
758 .HasColumnType(
"bigint");
760 b.Property<
int>(
"Number")
761 .HasColumnType(
"int");
763 b.Property<
long?>(
"PrimaryRevisionInformationId")
765 .HasColumnType(
"bigint");
767 b.Property<
string>(
"TargetCommitSha")
770 .HasColumnType(
"varchar(40)");
772 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"TargetCommitSha"),
"utf8mb4");
774 b.Property<
string>(
"TitleAtMerge")
776 .HasColumnType(
"longtext");
778 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"TitleAtMerge"),
"utf8mb4");
780 b.Property<
string>(
"Url")
782 .HasColumnType(
"longtext");
784 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Url"),
"utf8mb4");
788 b.HasIndex(
"MergedById");
790 b.HasIndex(
"PrimaryRevisionInformationId")
793 b.ToTable(
"TestMerges");
796 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
798 b.Property<
long?>(
"Id")
799 .ValueGeneratedOnAdd()
800 .HasColumnType(
"bigint");
802 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long?>(
"Id"));
804 b.Property<
string>(
"CanonicalName")
807 .HasColumnType(
"varchar(100)");
809 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"CanonicalName"),
"utf8mb4");
811 b.Property<DateTimeOffset?>(
"CreatedAt")
813 .HasColumnType(
"datetime(6)");
815 b.Property<
long?>(
"CreatedById")
816 .HasColumnType(
"bigint");
818 b.Property<
bool?>(
"Enabled")
820 .HasColumnType(
"tinyint(1)");
822 b.Property<
long?>(
"GroupId")
823 .HasColumnType(
"bigint");
825 b.Property<DateTimeOffset?>(
"LastPasswordUpdate")
826 .HasColumnType(
"datetime(6)");
828 b.Property<
string>(
"Name")
831 .HasColumnType(
"varchar(100)");
833 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Name"),
"utf8mb4");
835 b.Property<
string>(
"PasswordHash")
836 .HasColumnType(
"longtext");
838 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"PasswordHash"),
"utf8mb4");
840 b.Property<
string>(
"SystemIdentifier")
842 .HasColumnType(
"varchar(100)");
844 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"SystemIdentifier"),
"utf8mb4");
848 b.HasIndex(
"CanonicalName")
851 b.HasIndex(
"CreatedById");
853 b.HasIndex(
"GroupId");
855 b.HasIndex(
"SystemIdentifier")
861 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
863 b.Property<
long?>(
"Id")
864 .ValueGeneratedOnAdd()
865 .HasColumnType(
"bigint");
867 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long?>(
"Id"));
869 b.Property<
string>(
"Name")
872 .HasColumnType(
"varchar(100)");
874 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Name"),
"utf8mb4");
884 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
886 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
887 .WithMany(
"ChatSettings")
888 .HasForeignKey(
"InstanceId")
889 .OnDelete(DeleteBehavior.Cascade)
892 b.Navigation(
"Instance");
895 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
897 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
898 .WithMany(
"Channels")
899 .HasForeignKey(
"ChatSettingsId")
900 .OnDelete(DeleteBehavior.Cascade)
903 b.Navigation(
"ChatSettings");
906 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
908 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
910 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
911 .OnDelete(DeleteBehavior.Cascade)
914 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
915 .WithMany(
"CompileJobs")
916 .HasForeignKey(
"RevisionInformationId")
917 .OnDelete(DeleteBehavior.Cascade)
922 b.Navigation(
"RevisionInformation");
925 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
927 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
928 .WithOne(
"DreamDaemonSettings")
929 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
930 .OnDelete(DeleteBehavior.Cascade)
933 b.Navigation(
"Instance");
936 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
938 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
939 .WithOne(
"DreamMakerSettings")
940 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
941 .OnDelete(DeleteBehavior.Cascade)
944 b.Navigation(
"Instance");
947 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
949 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
950 .WithMany(
"InstancePermissionSets")
951 .HasForeignKey(
"InstanceId")
952 .OnDelete(DeleteBehavior.Cascade)
955 b.HasOne(
"Tgstation.Server.Host.Models.PermissionSet",
"PermissionSet")
956 .WithMany(
"InstancePermissionSets")
957 .HasForeignKey(
"PermissionSetId")
958 .OnDelete(DeleteBehavior.Cascade)
961 b.Navigation(
"Instance");
963 b.Navigation(
"PermissionSet");
966 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
968 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
970 .HasForeignKey(
"CancelledById");
972 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
974 .HasForeignKey(
"InstanceId")
975 .OnDelete(DeleteBehavior.Cascade)
978 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
980 .HasForeignKey(
"StartedById")
981 .OnDelete(DeleteBehavior.Cascade)
984 b.Navigation(
"CancelledBy");
986 b.Navigation(
"Instance");
988 b.Navigation(
"StartedBy");
991 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
993 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
994 .WithMany(
"OAuthConnections")
995 .HasForeignKey(
"UserId")
996 .OnDelete(DeleteBehavior.Cascade)
999 b.Navigation(
"User");
1002 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
1004 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
1005 .WithOne(
"PermissionSet")
1006 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"GroupId")
1007 .OnDelete(DeleteBehavior.Cascade);
1009 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
1010 .WithOne(
"PermissionSet")
1011 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"UserId")
1012 .OnDelete(DeleteBehavior.Cascade);
1014 b.Navigation(
"Group");
1016 b.Navigation(
"User");
1019 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
1021 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
1023 .HasForeignKey(
"CompileJobId")
1024 .OnDelete(DeleteBehavior.Cascade)
1027 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"InitialCompileJob")
1029 .HasForeignKey(
"InitialCompileJobId");
1031 b.Navigation(
"CompileJob");
1033 b.Navigation(
"InitialCompileJob");
1036 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
1038 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
1039 .WithOne(
"RepositorySettings")
1040 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
1041 .OnDelete(DeleteBehavior.Cascade)
1044 b.Navigation(
"Instance");
1047 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
1049 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
1050 .WithMany(
"ActiveTestMerges")
1051 .HasForeignKey(
"RevisionInformationId")
1052 .OnDelete(DeleteBehavior.Cascade)
1055 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
1056 .WithMany(
"RevisonInformations")
1057 .HasForeignKey(
"TestMergeId")
1058 .OnDelete(DeleteBehavior.ClientNoAction)
1061 b.Navigation(
"RevisionInformation");
1063 b.Navigation(
"TestMerge");
1066 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
1068 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
1069 .WithMany(
"RevisionInformations")
1070 .HasForeignKey(
"InstanceId")
1071 .OnDelete(DeleteBehavior.Cascade)
1074 b.Navigation(
"Instance");
1077 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
1079 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
1080 .WithMany(
"TestMerges")
1081 .HasForeignKey(
"MergedById")
1082 .OnDelete(DeleteBehavior.Restrict)
1085 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
1086 .WithOne(
"PrimaryTestMerge")
1087 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
1088 .OnDelete(DeleteBehavior.Cascade)
1091 b.Navigation(
"MergedBy");
1093 b.Navigation(
"PrimaryRevisionInformation");
1096 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
1098 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
1099 .WithMany(
"CreatedUsers")
1100 .HasForeignKey(
"CreatedById");
1102 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
1104 .HasForeignKey(
"GroupId");
1106 b.Navigation(
"CreatedBy");
1108 b.Navigation(
"Group");
1111 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
1113 b.Navigation(
"Channels");
1116 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
1118 b.Navigation(
"ChatSettings");
1120 b.Navigation(
"DreamDaemonSettings");
1122 b.Navigation(
"DreamMakerSettings");
1124 b.Navigation(
"InstancePermissionSets");
1126 b.Navigation(
"Jobs");
1128 b.Navigation(
"RepositorySettings");
1130 b.Navigation(
"RevisionInformations");
1133 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
1135 b.Navigation(
"InstancePermissionSets");
1138 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
1140 b.Navigation(
"ActiveTestMerges");
1142 b.Navigation(
"CompileJobs");
1144 b.Navigation(
"PrimaryTestMerge");
1147 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
1149 b.Navigation(
"RevisonInformations");
1152 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
1154 b.Navigation(
"CreatedUsers");
1156 b.Navigation(
"OAuthConnections");
1158 b.Navigation(
"PermissionSet");
1160 b.Navigation(
"TestMerges");
1163 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
1165 b.Navigation(
"PermissionSet")
1168 b.Navigation(
"Users");
1170#pragma warning restore 612, 618