12 protected override void BuildModel(ModelBuilder modelBuilder)
14#pragma warning disable 612, 618
16 .HasAnnotation(
"ProductVersion",
"8.0.10")
17 .HasAnnotation(
"Relational:MaxIdentifierLength", 64);
19 MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder);
21 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
23 b.Property<
long?>(
"Id")
24 .ValueGeneratedOnAdd()
25 .HasColumnType(
"bigint");
27 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long?>(
"Id"));
29 b.Property<ushort?>(
"ChannelLimit")
31 .HasColumnType(
"smallint unsigned");
33 b.Property<
string>(
"ConnectionString")
36 .HasColumnType(
"longtext");
38 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"ConnectionString"),
"utf8mb4");
40 b.Property<
bool?>(
"Enabled")
41 .HasColumnType(
"tinyint(1)");
43 b.Property<
long>(
"InstanceId")
44 .HasColumnType(
"bigint");
46 b.Property<
string>(
"Name")
49 .HasColumnType(
"varchar(100)");
51 b.Property<
int>(
"Provider")
52 .HasColumnType(
"int");
54 b.Property<uint?>(
"ReconnectionInterval")
56 .HasColumnType(
"int unsigned");
60 b.HasIndex(
"InstanceId",
"Name")
63 b.ToTable(
"ChatBots");
66 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
68 b.Property<
long>(
"Id")
69 .ValueGeneratedOnAdd()
70 .HasColumnType(
"bigint");
72 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long>(
"Id"));
74 b.Property<
long>(
"ChatSettingsId")
75 .HasColumnType(
"bigint");
77 b.Property<ulong?>(
"DiscordChannelId")
78 .HasColumnType(
"bigint unsigned");
80 b.Property<
string>(
"IrcChannel")
82 .HasColumnType(
"varchar(100)");
84 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"IrcChannel"),
"utf8mb4");
86 b.Property<
bool?>(
"IsAdminChannel")
88 .HasColumnType(
"tinyint(1)");
90 b.Property<
bool?>(
"IsSystemChannel")
92 .HasColumnType(
"tinyint(1)");
94 b.Property<
bool?>(
"IsUpdatesChannel")
96 .HasColumnType(
"tinyint(1)");
98 b.Property<
bool?>(
"IsWatchdogChannel")
100 .HasColumnType(
"tinyint(1)");
102 b.Property<
string>(
"Tag")
104 .HasColumnType(
"longtext");
106 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Tag"),
"utf8mb4");
110 b.HasIndex(
"ChatSettingsId",
"DiscordChannelId")
113 b.HasIndex(
"ChatSettingsId",
"IrcChannel")
116 b.ToTable(
"ChatChannels");
119 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
121 b.Property<
long?>(
"Id")
122 .ValueGeneratedOnAdd()
123 .HasColumnType(
"bigint");
125 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long?>(
"Id"));
127 b.Property<
int?>(
"DMApiMajorVersion")
128 .HasColumnType(
"int");
130 b.Property<
int?>(
"DMApiMinorVersion")
131 .HasColumnType(
"int");
133 b.Property<
int?>(
"DMApiPatchVersion")
134 .HasColumnType(
"int");
136 b.Property<Guid?>(
"DirectoryName")
138 .HasColumnType(
"char(36)");
140 b.Property<
string>(
"DmeName")
142 .HasColumnType(
"longtext");
144 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"DmeName"),
"utf8mb4");
146 b.Property<
string>(
"EngineVersion")
148 .HasColumnType(
"longtext");
150 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"EngineVersion"),
"utf8mb4");
152 b.Property<
long?>(
"GitHubDeploymentId")
153 .HasColumnType(
"bigint");
155 b.Property<
long?>(
"GitHubRepoId")
156 .HasColumnType(
"bigint");
158 b.Property<
long>(
"JobId")
159 .HasColumnType(
"bigint");
161 b.Property<
int?>(
"MinimumSecurityLevel")
162 .HasColumnType(
"int");
164 b.Property<
string>(
"Output")
166 .HasColumnType(
"longtext");
168 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Output"),
"utf8mb4");
170 b.Property<
string>(
"RepositoryOrigin")
171 .HasColumnType(
"longtext");
173 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"RepositoryOrigin"),
"utf8mb4");
175 b.Property<
long>(
"RevisionInformationId")
176 .HasColumnType(
"bigint");
180 b.HasIndex(
"DirectoryName");
185 b.HasIndex(
"RevisionInformationId");
187 b.ToTable(
"CompileJobs");
190 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
192 b.Property<
long>(
"Id")
193 .ValueGeneratedOnAdd()
194 .HasColumnType(
"bigint");
196 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long>(
"Id"));
198 b.Property<
string>(
"AdditionalParameters")
201 .HasColumnType(
"longtext");
203 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"AdditionalParameters"),
"utf8mb4");
205 b.Property<
bool?>(
"AllowWebClient")
207 .HasColumnType(
"tinyint(1)");
209 b.Property<
bool?>(
"AutoStart")
211 .HasColumnType(
"tinyint(1)");
213 b.Property<
bool?>(
"DumpOnHealthCheckRestart")
215 .HasColumnType(
"tinyint(1)");
217 b.Property<uint?>(
"HealthCheckSeconds")
219 .HasColumnType(
"int unsigned");
221 b.Property<
long>(
"InstanceId")
222 .HasColumnType(
"bigint");
224 b.Property<
bool?>(
"LogOutput")
226 .HasColumnType(
"tinyint(1)");
228 b.Property<uint?>(
"MapThreads")
230 .HasColumnType(
"int unsigned");
232 b.Property<
bool?>(
"Minidumps")
234 .HasColumnType(
"tinyint(1)");
236 b.Property<ushort?>(
"OpenDreamTopicPort")
238 .HasColumnType(
"smallint unsigned");
240 b.Property<ushort?>(
"Port")
242 .HasColumnType(
"smallint unsigned");
244 b.Property<
int>(
"SecurityLevel")
245 .HasColumnType(
"int");
247 b.Property<
bool?>(
"StartProfiler")
249 .HasColumnType(
"tinyint(1)");
251 b.Property<uint?>(
"StartupTimeout")
253 .HasColumnType(
"int unsigned");
255 b.Property<uint?>(
"TopicRequestTimeout")
257 .HasColumnType(
"int unsigned");
259 b.Property<
int>(
"Visibility")
260 .HasColumnType(
"int");
264 b.HasIndex(
"InstanceId")
267 b.ToTable(
"DreamDaemonSettings");
270 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
272 b.Property<
long>(
"Id")
273 .ValueGeneratedOnAdd()
274 .HasColumnType(
"bigint");
276 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long>(
"Id"));
278 b.Property<ushort?>(
"ApiValidationPort")
280 .HasColumnType(
"smallint unsigned");
282 b.Property<
int>(
"ApiValidationSecurityLevel")
283 .HasColumnType(
"int");
285 b.Property<
string>(
"CompilerAdditionalArguments")
287 .HasColumnType(
"varchar(10000)");
289 b.Property<
int>(
"DMApiValidationMode")
290 .HasColumnType(
"int");
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<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>(
"AutoStartCron")
324 .HasColumnType(
"varchar(1000)");
326 b.Property<
string>(
"AutoStopCron")
329 .HasColumnType(
"varchar(1000)");
331 b.Property<
string>(
"AutoUpdateCron")
334 .HasColumnType(
"varchar(1000)");
336 b.Property<uint?>(
"AutoUpdateInterval")
338 .HasColumnType(
"int unsigned");
340 b.Property<ushort?>(
"ChatBotLimit")
342 .HasColumnType(
"smallint unsigned");
344 b.Property<
int>(
"ConfigurationType")
345 .HasColumnType(
"int");
347 b.Property<
string>(
"Name")
350 .HasColumnType(
"varchar(100)");
352 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Name"),
"utf8mb4");
354 b.Property<
bool?>(
"Online")
356 .HasColumnType(
"tinyint(1)");
358 b.Property<
string>(
"Path")
360 .HasColumnType(
"varchar(255)");
362 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Path"),
"utf8mb4");
364 b.Property<
string>(
"SwarmIdentifer")
365 .HasColumnType(
"varchar(255)");
367 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"SwarmIdentifer"),
"utf8mb4");
371 b.HasIndex(
"Path",
"SwarmIdentifer")
374 b.ToTable(
"Instances");
377 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
379 b.Property<
long>(
"Id")
380 .ValueGeneratedOnAdd()
381 .HasColumnType(
"bigint");
383 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long>(
"Id"));
385 b.Property<ulong>(
"ChatBotRights")
386 .HasColumnType(
"bigint unsigned");
388 b.Property<ulong>(
"ConfigurationRights")
389 .HasColumnType(
"bigint unsigned");
391 b.Property<ulong>(
"DreamDaemonRights")
392 .HasColumnType(
"bigint unsigned");
394 b.Property<ulong>(
"DreamMakerRights")
395 .HasColumnType(
"bigint unsigned");
397 b.Property<ulong>(
"EngineRights")
398 .HasColumnType(
"bigint unsigned");
400 b.Property<
long>(
"InstanceId")
401 .HasColumnType(
"bigint");
403 b.Property<ulong>(
"InstancePermissionSetRights")
404 .HasColumnType(
"bigint unsigned");
406 b.Property<
long>(
"PermissionSetId")
407 .HasColumnType(
"bigint");
409 b.Property<ulong>(
"RepositoryRights")
410 .HasColumnType(
"bigint unsigned");
414 b.HasIndex(
"InstanceId");
416 b.HasIndex(
"PermissionSetId",
"InstanceId")
419 b.ToTable(
"InstancePermissionSets");
422 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
424 b.Property<
long?>(
"Id")
425 .ValueGeneratedOnAdd()
426 .HasColumnType(
"bigint");
428 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long?>(
"Id"));
430 b.Property<ulong?>(
"CancelRight")
431 .HasColumnType(
"bigint unsigned");
433 b.Property<ulong?>(
"CancelRightsType")
434 .HasColumnType(
"bigint unsigned");
436 b.Property<
bool?>(
"Cancelled")
438 .HasColumnType(
"tinyint(1)");
440 b.Property<
long?>(
"CancelledById")
441 .HasColumnType(
"bigint");
443 b.Property<
string>(
"Description")
445 .HasColumnType(
"longtext");
447 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Description"),
"utf8mb4");
449 b.Property<uint?>(
"ErrorCode")
450 .HasColumnType(
"int unsigned");
452 b.Property<
string>(
"ExceptionDetails")
453 .HasColumnType(
"longtext");
455 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"ExceptionDetails"),
"utf8mb4");
457 b.Property<
long>(
"InstanceId")
458 .HasColumnType(
"bigint");
460 b.Property<
byte>(
"JobCode")
461 .HasColumnType(
"tinyint unsigned");
463 b.Property<DateTimeOffset?>(
"StartedAt")
465 .HasColumnType(
"datetime(6)");
467 b.Property<
long>(
"StartedById")
468 .HasColumnType(
"bigint");
470 b.Property<DateTimeOffset?>(
"StoppedAt")
471 .HasColumnType(
"datetime(6)");
475 b.HasIndex(
"CancelledById");
477 b.HasIndex(
"InstanceId");
479 b.HasIndex(
"StartedById");
484 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
486 b.Property<
long>(
"Id")
487 .ValueGeneratedOnAdd()
488 .HasColumnType(
"bigint");
490 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long>(
"Id"));
492 b.Property<
string>(
"ExternalUserId")
495 .HasColumnType(
"varchar(100)");
497 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"ExternalUserId"),
"utf8mb4");
499 b.Property<
int>(
"Provider")
500 .HasColumnType(
"int");
502 b.Property<
long>(
"UserId")
503 .HasColumnType(
"bigint");
507 b.HasIndex(
"UserId");
509 b.HasIndex(
"Provider",
"ExternalUserId")
512 b.ToTable(
"OAuthConnections");
515 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
517 b.Property<
long?>(
"Id")
518 .ValueGeneratedOnAdd()
519 .HasColumnType(
"bigint");
521 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long?>(
"Id"));
523 b.Property<ulong>(
"AdministrationRights")
524 .HasColumnType(
"bigint unsigned");
526 b.Property<
long?>(
"GroupId")
527 .HasColumnType(
"bigint");
529 b.Property<ulong>(
"InstanceManagerRights")
530 .HasColumnType(
"bigint unsigned");
532 b.Property<
long?>(
"UserId")
533 .HasColumnType(
"bigint");
537 b.HasIndex(
"GroupId")
543 b.ToTable(
"PermissionSets");
546 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
548 b.Property<
long?>(
"Id")
549 .ValueGeneratedOnAdd()
550 .HasColumnType(
"bigint");
552 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long?>(
"Id"));
554 b.Property<
string>(
"AccessIdentifier")
556 .HasColumnType(
"longtext");
558 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"AccessIdentifier"),
"utf8mb4");
560 b.Property<
long>(
"CompileJobId")
561 .HasColumnType(
"bigint");
563 b.Property<
long?>(
"InitialCompileJobId")
564 .HasColumnType(
"bigint");
566 b.Property<
int>(
"LaunchSecurityLevel")
567 .HasColumnType(
"int");
569 b.Property<
int>(
"LaunchVisibility")
570 .HasColumnType(
"int");
572 b.Property<ushort>(
"Port")
573 .HasColumnType(
"smallint unsigned");
575 b.Property<
int>(
"ProcessId")
576 .HasColumnType(
"int");
578 b.Property<
int>(
"RebootState")
579 .HasColumnType(
"int");
581 b.Property<ushort?>(
"TopicPort")
582 .HasColumnType(
"smallint unsigned");
586 b.HasIndex(
"CompileJobId");
588 b.HasIndex(
"InitialCompileJobId");
590 b.ToTable(
"ReattachInformations");
593 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
595 b.Property<
long>(
"Id")
596 .ValueGeneratedOnAdd()
597 .HasColumnType(
"bigint");
599 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long>(
"Id"));
601 b.Property<
string>(
"AccessToken")
603 .HasColumnType(
"longtext");
605 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"AccessToken"),
"utf8mb4");
607 b.Property<
string>(
"AccessUser")
609 .HasColumnType(
"longtext");
611 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"AccessUser"),
"utf8mb4");
613 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
615 .HasColumnType(
"tinyint(1)");
617 b.Property<
bool?>(
"AutoUpdatesSynchronize")
619 .HasColumnType(
"tinyint(1)");
621 b.Property<
string>(
"CommitterEmail")
624 .HasColumnType(
"longtext");
626 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"CommitterEmail"),
"utf8mb4");
628 b.Property<
string>(
"CommitterName")
631 .HasColumnType(
"longtext");
633 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"CommitterName"),
"utf8mb4");
635 b.Property<
bool?>(
"CreateGitHubDeployments")
637 .HasColumnType(
"tinyint(1)");
639 b.Property<
long>(
"InstanceId")
640 .HasColumnType(
"bigint");
642 b.Property<
bool?>(
"PostTestMergeComment")
644 .HasColumnType(
"tinyint(1)");
646 b.Property<
bool?>(
"PushTestMergeCommits")
648 .HasColumnType(
"tinyint(1)");
650 b.Property<
bool?>(
"ShowTestMergeCommitters")
652 .HasColumnType(
"tinyint(1)");
654 b.Property<
bool?>(
"UpdateSubmodules")
656 .HasColumnType(
"tinyint(1)");
660 b.HasIndex(
"InstanceId")
663 b.ToTable(
"RepositorySettings");
666 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
668 b.Property<
long>(
"Id")
669 .ValueGeneratedOnAdd()
670 .HasColumnType(
"bigint");
672 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long>(
"Id"));
674 b.Property<
long>(
"RevisionInformationId")
675 .HasColumnType(
"bigint");
677 b.Property<
long>(
"TestMergeId")
678 .HasColumnType(
"bigint");
682 b.HasIndex(
"RevisionInformationId");
684 b.HasIndex(
"TestMergeId");
686 b.ToTable(
"RevInfoTestMerges");
689 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
691 b.Property<
long>(
"Id")
692 .ValueGeneratedOnAdd()
693 .HasColumnType(
"bigint");
695 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long>(
"Id"));
697 b.Property<
string>(
"CommitSha")
700 .HasColumnType(
"varchar(40)");
702 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"CommitSha"),
"utf8mb4");
704 b.Property<
long>(
"InstanceId")
705 .HasColumnType(
"bigint");
707 b.Property<
string>(
"OriginCommitSha")
710 .HasColumnType(
"varchar(40)");
712 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"OriginCommitSha"),
"utf8mb4");
714 b.Property<DateTimeOffset>(
"Timestamp")
715 .HasColumnType(
"datetime(6)");
719 b.HasIndex(
"InstanceId",
"CommitSha")
722 b.ToTable(
"RevisionInformations");
725 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
727 b.Property<
long>(
"Id")
728 .ValueGeneratedOnAdd()
729 .HasColumnType(
"bigint");
731 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long>(
"Id"));
733 b.Property<
string>(
"Author")
735 .HasColumnType(
"longtext");
737 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Author"),
"utf8mb4");
739 b.Property<
string>(
"BodyAtMerge")
741 .HasColumnType(
"longtext");
743 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"BodyAtMerge"),
"utf8mb4");
745 b.Property<
string>(
"Comment")
747 .HasColumnType(
"longtext");
749 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Comment"),
"utf8mb4");
751 b.Property<DateTimeOffset>(
"MergedAt")
752 .HasColumnType(
"datetime(6)");
754 b.Property<
long>(
"MergedById")
755 .HasColumnType(
"bigint");
757 b.Property<
int>(
"Number")
758 .HasColumnType(
"int");
760 b.Property<
long?>(
"PrimaryRevisionInformationId")
762 .HasColumnType(
"bigint");
764 b.Property<
string>(
"TargetCommitSha")
767 .HasColumnType(
"varchar(40)");
769 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"TargetCommitSha"),
"utf8mb4");
771 b.Property<
string>(
"TitleAtMerge")
773 .HasColumnType(
"longtext");
775 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"TitleAtMerge"),
"utf8mb4");
777 b.Property<
string>(
"Url")
779 .HasColumnType(
"longtext");
781 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Url"),
"utf8mb4");
785 b.HasIndex(
"MergedById");
787 b.HasIndex(
"PrimaryRevisionInformationId")
790 b.ToTable(
"TestMerges");
793 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
795 b.Property<
long?>(
"Id")
796 .ValueGeneratedOnAdd()
797 .HasColumnType(
"bigint");
799 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long?>(
"Id"));
801 b.Property<
string>(
"CanonicalName")
804 .HasColumnType(
"varchar(100)");
806 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"CanonicalName"),
"utf8mb4");
808 b.Property<DateTimeOffset?>(
"CreatedAt")
810 .HasColumnType(
"datetime(6)");
812 b.Property<
long?>(
"CreatedById")
813 .HasColumnType(
"bigint");
815 b.Property<
bool?>(
"Enabled")
817 .HasColumnType(
"tinyint(1)");
819 b.Property<
long?>(
"GroupId")
820 .HasColumnType(
"bigint");
822 b.Property<DateTimeOffset?>(
"LastPasswordUpdate")
823 .HasColumnType(
"datetime(6)");
825 b.Property<
string>(
"Name")
828 .HasColumnType(
"varchar(100)");
830 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Name"),
"utf8mb4");
832 b.Property<
string>(
"PasswordHash")
833 .HasColumnType(
"longtext");
835 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"PasswordHash"),
"utf8mb4");
837 b.Property<
string>(
"SystemIdentifier")
839 .HasColumnType(
"varchar(100)");
841 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"SystemIdentifier"),
"utf8mb4");
845 b.HasIndex(
"CanonicalName")
848 b.HasIndex(
"CreatedById");
850 b.HasIndex(
"GroupId");
852 b.HasIndex(
"SystemIdentifier")
858 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
860 b.Property<
long?>(
"Id")
861 .ValueGeneratedOnAdd()
862 .HasColumnType(
"bigint");
864 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long?>(
"Id"));
866 b.Property<
string>(
"Name")
869 .HasColumnType(
"varchar(100)");
871 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Name"),
"utf8mb4");
881 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
883 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
884 .WithMany(
"ChatSettings")
885 .HasForeignKey(
"InstanceId")
886 .OnDelete(DeleteBehavior.Cascade)
889 b.Navigation(
"Instance");
892 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
894 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
895 .WithMany(
"Channels")
896 .HasForeignKey(
"ChatSettingsId")
897 .OnDelete(DeleteBehavior.Cascade)
900 b.Navigation(
"ChatSettings");
903 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
905 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
907 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
908 .OnDelete(DeleteBehavior.Cascade)
911 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
912 .WithMany(
"CompileJobs")
913 .HasForeignKey(
"RevisionInformationId")
914 .OnDelete(DeleteBehavior.Cascade)
919 b.Navigation(
"RevisionInformation");
922 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
924 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
925 .WithOne(
"DreamDaemonSettings")
926 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
927 .OnDelete(DeleteBehavior.Cascade)
930 b.Navigation(
"Instance");
933 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
935 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
936 .WithOne(
"DreamMakerSettings")
937 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
938 .OnDelete(DeleteBehavior.Cascade)
941 b.Navigation(
"Instance");
944 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
946 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
947 .WithMany(
"InstancePermissionSets")
948 .HasForeignKey(
"InstanceId")
949 .OnDelete(DeleteBehavior.Cascade)
952 b.HasOne(
"Tgstation.Server.Host.Models.PermissionSet",
"PermissionSet")
953 .WithMany(
"InstancePermissionSets")
954 .HasForeignKey(
"PermissionSetId")
955 .OnDelete(DeleteBehavior.Cascade)
958 b.Navigation(
"Instance");
960 b.Navigation(
"PermissionSet");
963 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
965 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
967 .HasForeignKey(
"CancelledById");
969 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
971 .HasForeignKey(
"InstanceId")
972 .OnDelete(DeleteBehavior.Cascade)
975 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
977 .HasForeignKey(
"StartedById")
978 .OnDelete(DeleteBehavior.Cascade)
981 b.Navigation(
"CancelledBy");
983 b.Navigation(
"Instance");
985 b.Navigation(
"StartedBy");
988 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
990 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
991 .WithMany(
"OAuthConnections")
992 .HasForeignKey(
"UserId")
993 .OnDelete(DeleteBehavior.Cascade)
996 b.Navigation(
"User");
999 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
1001 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
1002 .WithOne(
"PermissionSet")
1003 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"GroupId")
1004 .OnDelete(DeleteBehavior.Cascade);
1006 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
1007 .WithOne(
"PermissionSet")
1008 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"UserId")
1009 .OnDelete(DeleteBehavior.Cascade);
1011 b.Navigation(
"Group");
1013 b.Navigation(
"User");
1016 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
1018 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
1020 .HasForeignKey(
"CompileJobId")
1021 .OnDelete(DeleteBehavior.Cascade)
1024 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"InitialCompileJob")
1026 .HasForeignKey(
"InitialCompileJobId");
1028 b.Navigation(
"CompileJob");
1030 b.Navigation(
"InitialCompileJob");
1033 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
1035 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
1036 .WithOne(
"RepositorySettings")
1037 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
1038 .OnDelete(DeleteBehavior.Cascade)
1041 b.Navigation(
"Instance");
1044 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
1046 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
1047 .WithMany(
"ActiveTestMerges")
1048 .HasForeignKey(
"RevisionInformationId")
1049 .OnDelete(DeleteBehavior.Cascade)
1052 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
1053 .WithMany(
"RevisonInformations")
1054 .HasForeignKey(
"TestMergeId")
1055 .OnDelete(DeleteBehavior.ClientNoAction)
1058 b.Navigation(
"RevisionInformation");
1060 b.Navigation(
"TestMerge");
1063 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
1065 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
1066 .WithMany(
"RevisionInformations")
1067 .HasForeignKey(
"InstanceId")
1068 .OnDelete(DeleteBehavior.Cascade)
1071 b.Navigation(
"Instance");
1074 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
1076 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
1077 .WithMany(
"TestMerges")
1078 .HasForeignKey(
"MergedById")
1079 .OnDelete(DeleteBehavior.Restrict)
1082 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
1083 .WithOne(
"PrimaryTestMerge")
1084 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
1085 .OnDelete(DeleteBehavior.Cascade)
1088 b.Navigation(
"MergedBy");
1090 b.Navigation(
"PrimaryRevisionInformation");
1093 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
1095 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
1096 .WithMany(
"CreatedUsers")
1097 .HasForeignKey(
"CreatedById");
1099 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
1101 .HasForeignKey(
"GroupId");
1103 b.Navigation(
"CreatedBy");
1105 b.Navigation(
"Group");
1108 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
1110 b.Navigation(
"Channels");
1113 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
1115 b.Navigation(
"ChatSettings");
1117 b.Navigation(
"DreamDaemonSettings");
1119 b.Navigation(
"DreamMakerSettings");
1121 b.Navigation(
"InstancePermissionSets");
1123 b.Navigation(
"Jobs");
1125 b.Navigation(
"RepositorySettings");
1127 b.Navigation(
"RevisionInformations");
1130 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
1132 b.Navigation(
"InstancePermissionSets");
1135 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
1137 b.Navigation(
"ActiveTestMerges");
1139 b.Navigation(
"CompileJobs");
1141 b.Navigation(
"PrimaryTestMerge");
1144 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
1146 b.Navigation(
"RevisonInformations");
1149 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
1151 b.Navigation(
"CreatedUsers");
1153 b.Navigation(
"OAuthConnections");
1155 b.Navigation(
"PermissionSet");
1157 b.Navigation(
"TestMerges");
1160 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
1162 b.Navigation(
"PermissionSet")
1165 b.Navigation(
"Users");
1167#pragma warning restore 612, 618