12 protected override void BuildModel(ModelBuilder modelBuilder)
14#pragma warning disable 612, 618
16 .HasAnnotation(
"ProductVersion",
"8.0.13")
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.OidcConnection", b =>
517 b.Property<
long>(
"Id")
518 .ValueGeneratedOnAdd()
519 .HasColumnType(
"bigint");
521 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long>(
"Id"));
523 b.Property<
string>(
"ExternalUserId")
526 .HasColumnType(
"varchar(100)");
528 b.Property<
string>(
"SchemeKey")
531 .HasColumnType(
"varchar(100)");
533 b.Property<
long>(
"UserId")
534 .HasColumnType(
"bigint");
538 b.HasIndex(
"UserId");
540 b.HasIndex(
"SchemeKey",
"ExternalUserId")
543 b.ToTable(
"OidcConnections");
546 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
548 b.Property<
long?>(
"Id")
549 .ValueGeneratedOnAdd()
550 .HasColumnType(
"bigint");
552 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long?>(
"Id"));
554 b.Property<ulong>(
"AdministrationRights")
555 .HasColumnType(
"bigint unsigned");
557 b.Property<
long?>(
"GroupId")
558 .HasColumnType(
"bigint");
560 b.Property<ulong>(
"InstanceManagerRights")
561 .HasColumnType(
"bigint unsigned");
563 b.Property<
long?>(
"UserId")
564 .HasColumnType(
"bigint");
568 b.HasIndex(
"GroupId")
574 b.ToTable(
"PermissionSets");
577 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
579 b.Property<
long?>(
"Id")
580 .ValueGeneratedOnAdd()
581 .HasColumnType(
"bigint");
583 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long?>(
"Id"));
585 b.Property<
string>(
"AccessIdentifier")
587 .HasColumnType(
"longtext");
589 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"AccessIdentifier"),
"utf8mb4");
591 b.Property<
long>(
"CompileJobId")
592 .HasColumnType(
"bigint");
594 b.Property<
long?>(
"InitialCompileJobId")
595 .HasColumnType(
"bigint");
597 b.Property<
int>(
"LaunchSecurityLevel")
598 .HasColumnType(
"int");
600 b.Property<
int>(
"LaunchVisibility")
601 .HasColumnType(
"int");
603 b.Property<ushort>(
"Port")
604 .HasColumnType(
"smallint unsigned");
606 b.Property<
int>(
"ProcessId")
607 .HasColumnType(
"int");
609 b.Property<
int>(
"RebootState")
610 .HasColumnType(
"int");
612 b.Property<ushort?>(
"TopicPort")
613 .HasColumnType(
"smallint unsigned");
617 b.HasIndex(
"CompileJobId");
619 b.HasIndex(
"InitialCompileJobId");
621 b.ToTable(
"ReattachInformations");
624 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
626 b.Property<
long>(
"Id")
627 .ValueGeneratedOnAdd()
628 .HasColumnType(
"bigint");
630 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long>(
"Id"));
632 b.Property<
string>(
"AccessToken")
634 .HasColumnType(
"longtext");
636 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"AccessToken"),
"utf8mb4");
638 b.Property<
string>(
"AccessUser")
640 .HasColumnType(
"longtext");
642 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"AccessUser"),
"utf8mb4");
644 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
646 .HasColumnType(
"tinyint(1)");
648 b.Property<
bool?>(
"AutoUpdatesSynchronize")
650 .HasColumnType(
"tinyint(1)");
652 b.Property<
string>(
"CommitterEmail")
655 .HasColumnType(
"longtext");
657 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"CommitterEmail"),
"utf8mb4");
659 b.Property<
string>(
"CommitterName")
662 .HasColumnType(
"longtext");
664 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"CommitterName"),
"utf8mb4");
666 b.Property<
bool?>(
"CreateGitHubDeployments")
668 .HasColumnType(
"tinyint(1)");
670 b.Property<
long>(
"InstanceId")
671 .HasColumnType(
"bigint");
673 b.Property<
bool?>(
"PostTestMergeComment")
675 .HasColumnType(
"tinyint(1)");
677 b.Property<
bool?>(
"PushTestMergeCommits")
679 .HasColumnType(
"tinyint(1)");
681 b.Property<
bool?>(
"ShowTestMergeCommitters")
683 .HasColumnType(
"tinyint(1)");
685 b.Property<
bool?>(
"UpdateSubmodules")
687 .HasColumnType(
"tinyint(1)");
691 b.HasIndex(
"InstanceId")
694 b.ToTable(
"RepositorySettings");
697 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
699 b.Property<
long>(
"Id")
700 .ValueGeneratedOnAdd()
701 .HasColumnType(
"bigint");
703 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long>(
"Id"));
705 b.Property<
long>(
"RevisionInformationId")
706 .HasColumnType(
"bigint");
708 b.Property<
long>(
"TestMergeId")
709 .HasColumnType(
"bigint");
713 b.HasIndex(
"RevisionInformationId");
715 b.HasIndex(
"TestMergeId");
717 b.ToTable(
"RevInfoTestMerges");
720 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
722 b.Property<
long>(
"Id")
723 .ValueGeneratedOnAdd()
724 .HasColumnType(
"bigint");
726 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long>(
"Id"));
728 b.Property<
string>(
"CommitSha")
731 .HasColumnType(
"varchar(40)");
733 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"CommitSha"),
"utf8mb4");
735 b.Property<
long>(
"InstanceId")
736 .HasColumnType(
"bigint");
738 b.Property<
string>(
"OriginCommitSha")
741 .HasColumnType(
"varchar(40)");
743 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"OriginCommitSha"),
"utf8mb4");
745 b.Property<DateTimeOffset>(
"Timestamp")
746 .HasColumnType(
"datetime(6)");
750 b.HasIndex(
"InstanceId",
"CommitSha")
753 b.ToTable(
"RevisionInformations");
756 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
758 b.Property<
long>(
"Id")
759 .ValueGeneratedOnAdd()
760 .HasColumnType(
"bigint");
762 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long>(
"Id"));
764 b.Property<
string>(
"Author")
766 .HasColumnType(
"longtext");
768 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Author"),
"utf8mb4");
770 b.Property<
string>(
"BodyAtMerge")
772 .HasColumnType(
"longtext");
774 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"BodyAtMerge"),
"utf8mb4");
776 b.Property<
string>(
"Comment")
778 .HasColumnType(
"longtext");
780 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Comment"),
"utf8mb4");
782 b.Property<DateTimeOffset>(
"MergedAt")
783 .HasColumnType(
"datetime(6)");
785 b.Property<
long>(
"MergedById")
786 .HasColumnType(
"bigint");
788 b.Property<
int>(
"Number")
789 .HasColumnType(
"int");
791 b.Property<
long?>(
"PrimaryRevisionInformationId")
793 .HasColumnType(
"bigint");
795 b.Property<
string>(
"TargetCommitSha")
798 .HasColumnType(
"varchar(40)");
800 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"TargetCommitSha"),
"utf8mb4");
802 b.Property<
string>(
"TitleAtMerge")
804 .HasColumnType(
"longtext");
806 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"TitleAtMerge"),
"utf8mb4");
808 b.Property<
string>(
"Url")
810 .HasColumnType(
"longtext");
812 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Url"),
"utf8mb4");
816 b.HasIndex(
"MergedById");
818 b.HasIndex(
"PrimaryRevisionInformationId")
821 b.ToTable(
"TestMerges");
824 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
826 b.Property<
long?>(
"Id")
827 .ValueGeneratedOnAdd()
828 .HasColumnType(
"bigint");
830 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long?>(
"Id"));
832 b.Property<
string>(
"CanonicalName")
835 .HasColumnType(
"varchar(100)");
837 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"CanonicalName"),
"utf8mb4");
839 b.Property<DateTimeOffset?>(
"CreatedAt")
841 .HasColumnType(
"datetime(6)");
843 b.Property<
long?>(
"CreatedById")
844 .HasColumnType(
"bigint");
846 b.Property<
bool?>(
"Enabled")
848 .HasColumnType(
"tinyint(1)");
850 b.Property<
long?>(
"GroupId")
851 .HasColumnType(
"bigint");
853 b.Property<DateTimeOffset?>(
"LastPasswordUpdate")
854 .HasColumnType(
"datetime(6)");
856 b.Property<
string>(
"Name")
859 .HasColumnType(
"varchar(100)");
861 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Name"),
"utf8mb4");
863 b.Property<
string>(
"PasswordHash")
864 .HasColumnType(
"longtext");
866 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"PasswordHash"),
"utf8mb4");
868 b.Property<
string>(
"SystemIdentifier")
870 .HasColumnType(
"varchar(100)");
872 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"SystemIdentifier"),
"utf8mb4");
876 b.HasIndex(
"CanonicalName")
879 b.HasIndex(
"CreatedById");
881 b.HasIndex(
"GroupId");
883 b.HasIndex(
"SystemIdentifier")
889 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
891 b.Property<
long?>(
"Id")
892 .ValueGeneratedOnAdd()
893 .HasColumnType(
"bigint");
895 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long?>(
"Id"));
897 b.Property<
string>(
"Name")
900 .HasColumnType(
"varchar(100)");
902 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Name"),
"utf8mb4");
912 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
914 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
915 .WithMany(
"ChatSettings")
916 .HasForeignKey(
"InstanceId")
917 .OnDelete(DeleteBehavior.Cascade)
920 b.Navigation(
"Instance");
923 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
925 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
926 .WithMany(
"Channels")
927 .HasForeignKey(
"ChatSettingsId")
928 .OnDelete(DeleteBehavior.Cascade)
931 b.Navigation(
"ChatSettings");
934 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
936 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
938 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
939 .OnDelete(DeleteBehavior.Cascade)
942 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
943 .WithMany(
"CompileJobs")
944 .HasForeignKey(
"RevisionInformationId")
945 .OnDelete(DeleteBehavior.Cascade)
950 b.Navigation(
"RevisionInformation");
953 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
955 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
956 .WithOne(
"DreamDaemonSettings")
957 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
958 .OnDelete(DeleteBehavior.Cascade)
961 b.Navigation(
"Instance");
964 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
966 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
967 .WithOne(
"DreamMakerSettings")
968 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
969 .OnDelete(DeleteBehavior.Cascade)
972 b.Navigation(
"Instance");
975 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
977 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
978 .WithMany(
"InstancePermissionSets")
979 .HasForeignKey(
"InstanceId")
980 .OnDelete(DeleteBehavior.Cascade)
983 b.HasOne(
"Tgstation.Server.Host.Models.PermissionSet",
"PermissionSet")
984 .WithMany(
"InstancePermissionSets")
985 .HasForeignKey(
"PermissionSetId")
986 .OnDelete(DeleteBehavior.Cascade)
989 b.Navigation(
"Instance");
991 b.Navigation(
"PermissionSet");
994 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
996 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
998 .HasForeignKey(
"CancelledById");
1000 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
1002 .HasForeignKey(
"InstanceId")
1003 .OnDelete(DeleteBehavior.Cascade)
1006 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
1008 .HasForeignKey(
"StartedById")
1009 .OnDelete(DeleteBehavior.Cascade)
1012 b.Navigation(
"CancelledBy");
1014 b.Navigation(
"Instance");
1016 b.Navigation(
"StartedBy");
1019 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
1021 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
1022 .WithMany(
"OAuthConnections")
1023 .HasForeignKey(
"UserId")
1024 .OnDelete(DeleteBehavior.Cascade)
1027 b.Navigation(
"User");
1030 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OidcConnection", b =>
1032 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
1033 .WithMany(
"OidcConnections")
1034 .HasForeignKey(
"UserId")
1035 .OnDelete(DeleteBehavior.Cascade)
1038 b.Navigation(
"User");
1041 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
1043 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
1044 .WithOne(
"PermissionSet")
1045 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"GroupId")
1046 .OnDelete(DeleteBehavior.Cascade);
1048 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
1049 .WithOne(
"PermissionSet")
1050 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"UserId")
1051 .OnDelete(DeleteBehavior.Cascade);
1053 b.Navigation(
"Group");
1055 b.Navigation(
"User");
1058 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
1060 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
1062 .HasForeignKey(
"CompileJobId")
1063 .OnDelete(DeleteBehavior.Cascade)
1066 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"InitialCompileJob")
1068 .HasForeignKey(
"InitialCompileJobId");
1070 b.Navigation(
"CompileJob");
1072 b.Navigation(
"InitialCompileJob");
1075 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
1077 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
1078 .WithOne(
"RepositorySettings")
1079 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
1080 .OnDelete(DeleteBehavior.Cascade)
1083 b.Navigation(
"Instance");
1086 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
1088 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
1089 .WithMany(
"ActiveTestMerges")
1090 .HasForeignKey(
"RevisionInformationId")
1091 .OnDelete(DeleteBehavior.Cascade)
1094 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
1095 .WithMany(
"RevisonInformations")
1096 .HasForeignKey(
"TestMergeId")
1097 .OnDelete(DeleteBehavior.ClientNoAction)
1100 b.Navigation(
"RevisionInformation");
1102 b.Navigation(
"TestMerge");
1105 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
1107 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
1108 .WithMany(
"RevisionInformations")
1109 .HasForeignKey(
"InstanceId")
1110 .OnDelete(DeleteBehavior.Cascade)
1113 b.Navigation(
"Instance");
1116 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
1118 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
1119 .WithMany(
"TestMerges")
1120 .HasForeignKey(
"MergedById")
1121 .OnDelete(DeleteBehavior.Restrict)
1124 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
1125 .WithOne(
"PrimaryTestMerge")
1126 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
1127 .OnDelete(DeleteBehavior.Cascade)
1130 b.Navigation(
"MergedBy");
1132 b.Navigation(
"PrimaryRevisionInformation");
1135 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
1137 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
1138 .WithMany(
"CreatedUsers")
1139 .HasForeignKey(
"CreatedById");
1141 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
1143 .HasForeignKey(
"GroupId");
1145 b.Navigation(
"CreatedBy");
1147 b.Navigation(
"Group");
1150 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
1152 b.Navigation(
"Channels");
1155 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
1157 b.Navigation(
"ChatSettings");
1159 b.Navigation(
"DreamDaemonSettings");
1161 b.Navigation(
"DreamMakerSettings");
1163 b.Navigation(
"InstancePermissionSets");
1165 b.Navigation(
"Jobs");
1167 b.Navigation(
"RepositorySettings");
1169 b.Navigation(
"RevisionInformations");
1172 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
1174 b.Navigation(
"InstancePermissionSets");
1177 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
1179 b.Navigation(
"ActiveTestMerges");
1181 b.Navigation(
"CompileJobs");
1183 b.Navigation(
"PrimaryTestMerge");
1186 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
1188 b.Navigation(
"RevisonInformations");
1191 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
1193 b.Navigation(
"CreatedUsers");
1195 b.Navigation(
"OAuthConnections");
1197 b.Navigation(
"OidcConnections");
1199 b.Navigation(
"PermissionSet");
1201 b.Navigation(
"TestMerges");
1204 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
1206 b.Navigation(
"PermissionSet")
1209 b.Navigation(
"Users");
1211#pragma warning restore 612, 618