17#pragma warning disable 612, 618
19 .HasAnnotation(
"ProductVersion",
"8.0.4")
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<
int?>(
"GitHubDeploymentId")
156 .HasColumnType(
"int");
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?>(
"Port")
241 .HasColumnType(
"smallint unsigned");
243 b.Property<
int>(
"SecurityLevel")
244 .HasColumnType(
"int");
246 b.Property<
bool?>(
"StartProfiler")
248 .HasColumnType(
"tinyint(1)");
250 b.Property<uint?>(
"StartupTimeout")
252 .HasColumnType(
"int unsigned");
254 b.Property<uint?>(
"TopicRequestTimeout")
256 .HasColumnType(
"int unsigned");
258 b.Property<
int>(
"Visibility")
259 .HasColumnType(
"int");
263 b.HasIndex(
"InstanceId")
266 b.ToTable(
"DreamDaemonSettings");
269 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
271 b.Property<
long>(
"Id")
272 .ValueGeneratedOnAdd()
273 .HasColumnType(
"bigint");
275 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long>(
"Id"));
277 b.Property<ushort?>(
"ApiValidationPort")
279 .HasColumnType(
"smallint unsigned");
281 b.Property<
int>(
"ApiValidationSecurityLevel")
282 .HasColumnType(
"int");
284 b.Property<
long>(
"InstanceId")
285 .HasColumnType(
"bigint");
287 b.Property<
string>(
"ProjectName")
289 .HasColumnType(
"longtext");
291 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"ProjectName"),
"utf8mb4");
293 b.Property<
bool?>(
"RequireDMApiValidation")
295 .HasColumnType(
"tinyint(1)");
297 b.Property<TimeSpan?>(
"Timeout")
299 .HasColumnType(
"time(6)");
303 b.HasIndex(
"InstanceId")
306 b.ToTable(
"DreamMakerSettings");
309 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
311 b.Property<
long?>(
"Id")
312 .ValueGeneratedOnAdd()
313 .HasColumnType(
"bigint");
315 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long?>(
"Id"));
317 b.Property<uint?>(
"AutoUpdateInterval")
319 .HasColumnType(
"int unsigned");
321 b.Property<ushort?>(
"ChatBotLimit")
323 .HasColumnType(
"smallint unsigned");
325 b.Property<
int>(
"ConfigurationType")
326 .HasColumnType(
"int");
328 b.Property<
string>(
"Name")
331 .HasColumnType(
"varchar(100)");
333 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Name"),
"utf8mb4");
335 b.Property<
bool?>(
"Online")
337 .HasColumnType(
"tinyint(1)");
339 b.Property<
string>(
"Path")
341 .HasColumnType(
"varchar(255)");
343 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Path"),
"utf8mb4");
345 b.Property<
string>(
"SwarmIdentifer")
346 .HasColumnType(
"varchar(255)");
348 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"SwarmIdentifer"),
"utf8mb4");
352 b.HasIndex(
"Path",
"SwarmIdentifer")
355 b.ToTable(
"Instances");
358 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
360 b.Property<
long>(
"Id")
361 .ValueGeneratedOnAdd()
362 .HasColumnType(
"bigint");
364 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long>(
"Id"));
366 b.Property<ulong>(
"ChatBotRights")
367 .HasColumnType(
"bigint unsigned");
369 b.Property<ulong>(
"ConfigurationRights")
370 .HasColumnType(
"bigint unsigned");
372 b.Property<ulong>(
"DreamDaemonRights")
373 .HasColumnType(
"bigint unsigned");
375 b.Property<ulong>(
"DreamMakerRights")
376 .HasColumnType(
"bigint unsigned");
378 b.Property<ulong>(
"EngineRights")
379 .HasColumnType(
"bigint unsigned");
381 b.Property<
long>(
"InstanceId")
382 .HasColumnType(
"bigint");
384 b.Property<ulong>(
"InstancePermissionSetRights")
385 .HasColumnType(
"bigint unsigned");
387 b.Property<
long>(
"PermissionSetId")
388 .HasColumnType(
"bigint");
390 b.Property<ulong>(
"RepositoryRights")
391 .HasColumnType(
"bigint unsigned");
395 b.HasIndex(
"InstanceId");
397 b.HasIndex(
"PermissionSetId",
"InstanceId")
400 b.ToTable(
"InstancePermissionSets");
403 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
405 b.Property<
long?>(
"Id")
406 .ValueGeneratedOnAdd()
407 .HasColumnType(
"bigint");
409 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long?>(
"Id"));
411 b.Property<ulong?>(
"CancelRight")
412 .HasColumnType(
"bigint unsigned");
414 b.Property<ulong?>(
"CancelRightsType")
415 .HasColumnType(
"bigint unsigned");
417 b.Property<
bool?>(
"Cancelled")
419 .HasColumnType(
"tinyint(1)");
421 b.Property<
long?>(
"CancelledById")
422 .HasColumnType(
"bigint");
424 b.Property<
string>(
"Description")
426 .HasColumnType(
"longtext");
428 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Description"),
"utf8mb4");
430 b.Property<uint?>(
"ErrorCode")
431 .HasColumnType(
"int unsigned");
433 b.Property<
string>(
"ExceptionDetails")
434 .HasColumnType(
"longtext");
436 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"ExceptionDetails"),
"utf8mb4");
438 b.Property<
long>(
"InstanceId")
439 .HasColumnType(
"bigint");
441 b.Property<
byte>(
"JobCode")
442 .HasColumnType(
"tinyint unsigned");
444 b.Property<DateTimeOffset?>(
"StartedAt")
446 .HasColumnType(
"datetime(6)");
448 b.Property<
long>(
"StartedById")
449 .HasColumnType(
"bigint");
451 b.Property<DateTimeOffset?>(
"StoppedAt")
452 .HasColumnType(
"datetime(6)");
456 b.HasIndex(
"CancelledById");
458 b.HasIndex(
"InstanceId");
460 b.HasIndex(
"StartedById");
465 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
467 b.Property<
long>(
"Id")
468 .ValueGeneratedOnAdd()
469 .HasColumnType(
"bigint");
471 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long>(
"Id"));
473 b.Property<
string>(
"ExternalUserId")
476 .HasColumnType(
"varchar(100)");
478 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"ExternalUserId"),
"utf8mb4");
480 b.Property<
int>(
"Provider")
481 .HasColumnType(
"int");
483 b.Property<
long?>(
"UserId")
484 .HasColumnType(
"bigint");
488 b.HasIndex(
"UserId");
490 b.HasIndex(
"Provider",
"ExternalUserId")
493 b.ToTable(
"OAuthConnections");
496 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
498 b.Property<
long?>(
"Id")
499 .ValueGeneratedOnAdd()
500 .HasColumnType(
"bigint");
502 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long?>(
"Id"));
504 b.Property<ulong>(
"AdministrationRights")
505 .HasColumnType(
"bigint unsigned");
507 b.Property<
long?>(
"GroupId")
508 .HasColumnType(
"bigint");
510 b.Property<ulong>(
"InstanceManagerRights")
511 .HasColumnType(
"bigint unsigned");
513 b.Property<
long?>(
"UserId")
514 .HasColumnType(
"bigint");
518 b.HasIndex(
"GroupId")
524 b.ToTable(
"PermissionSets");
527 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
529 b.Property<
long?>(
"Id")
530 .ValueGeneratedOnAdd()
531 .HasColumnType(
"bigint");
533 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long?>(
"Id"));
535 b.Property<
string>(
"AccessIdentifier")
537 .HasColumnType(
"longtext");
539 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"AccessIdentifier"),
"utf8mb4");
541 b.Property<
long>(
"CompileJobId")
542 .HasColumnType(
"bigint");
544 b.Property<
long?>(
"InitialCompileJobId")
545 .HasColumnType(
"bigint");
547 b.Property<
int>(
"LaunchSecurityLevel")
548 .HasColumnType(
"int");
550 b.Property<
int>(
"LaunchVisibility")
551 .HasColumnType(
"int");
553 b.Property<ushort>(
"Port")
554 .HasColumnType(
"smallint unsigned");
556 b.Property<
int>(
"ProcessId")
557 .HasColumnType(
"int");
559 b.Property<
int>(
"RebootState")
560 .HasColumnType(
"int");
562 b.Property<ushort?>(
"TopicPort")
563 .HasColumnType(
"smallint unsigned");
567 b.HasIndex(
"CompileJobId");
569 b.HasIndex(
"InitialCompileJobId");
571 b.ToTable(
"ReattachInformations");
574 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
576 b.Property<
long>(
"Id")
577 .ValueGeneratedOnAdd()
578 .HasColumnType(
"bigint");
580 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long>(
"Id"));
582 b.Property<
string>(
"AccessToken")
584 .HasColumnType(
"longtext");
586 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"AccessToken"),
"utf8mb4");
588 b.Property<
string>(
"AccessUser")
590 .HasColumnType(
"longtext");
592 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"AccessUser"),
"utf8mb4");
594 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
596 .HasColumnType(
"tinyint(1)");
598 b.Property<
bool?>(
"AutoUpdatesSynchronize")
600 .HasColumnType(
"tinyint(1)");
602 b.Property<
string>(
"CommitterEmail")
605 .HasColumnType(
"longtext");
607 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"CommitterEmail"),
"utf8mb4");
609 b.Property<
string>(
"CommitterName")
612 .HasColumnType(
"longtext");
614 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"CommitterName"),
"utf8mb4");
616 b.Property<
bool?>(
"CreateGitHubDeployments")
618 .HasColumnType(
"tinyint(1)");
620 b.Property<
long>(
"InstanceId")
621 .HasColumnType(
"bigint");
623 b.Property<
bool?>(
"PostTestMergeComment")
625 .HasColumnType(
"tinyint(1)");
627 b.Property<
bool?>(
"PushTestMergeCommits")
629 .HasColumnType(
"tinyint(1)");
631 b.Property<
bool?>(
"ShowTestMergeCommitters")
633 .HasColumnType(
"tinyint(1)");
635 b.Property<
bool?>(
"UpdateSubmodules")
637 .HasColumnType(
"tinyint(1)");
641 b.HasIndex(
"InstanceId")
644 b.ToTable(
"RepositorySettings");
647 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
649 b.Property<
long>(
"Id")
650 .ValueGeneratedOnAdd()
651 .HasColumnType(
"bigint");
653 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long>(
"Id"));
655 b.Property<
long>(
"RevisionInformationId")
656 .HasColumnType(
"bigint");
658 b.Property<
long>(
"TestMergeId")
659 .HasColumnType(
"bigint");
663 b.HasIndex(
"RevisionInformationId");
665 b.HasIndex(
"TestMergeId");
667 b.ToTable(
"RevInfoTestMerges");
670 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
672 b.Property<
long>(
"Id")
673 .ValueGeneratedOnAdd()
674 .HasColumnType(
"bigint");
676 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long>(
"Id"));
678 b.Property<
string>(
"CommitSha")
681 .HasColumnType(
"varchar(40)");
683 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"CommitSha"),
"utf8mb4");
685 b.Property<
long>(
"InstanceId")
686 .HasColumnType(
"bigint");
688 b.Property<
string>(
"OriginCommitSha")
691 .HasColumnType(
"varchar(40)");
693 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"OriginCommitSha"),
"utf8mb4");
695 b.Property<DateTimeOffset>(
"Timestamp")
696 .HasColumnType(
"datetime(6)");
700 b.HasIndex(
"InstanceId",
"CommitSha")
703 b.ToTable(
"RevisionInformations");
706 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
708 b.Property<
long>(
"Id")
709 .ValueGeneratedOnAdd()
710 .HasColumnType(
"bigint");
712 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long>(
"Id"));
714 b.Property<
string>(
"Author")
716 .HasColumnType(
"longtext");
718 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Author"),
"utf8mb4");
720 b.Property<
string>(
"BodyAtMerge")
722 .HasColumnType(
"longtext");
724 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"BodyAtMerge"),
"utf8mb4");
726 b.Property<
string>(
"Comment")
728 .HasColumnType(
"longtext");
730 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Comment"),
"utf8mb4");
732 b.Property<DateTimeOffset>(
"MergedAt")
733 .HasColumnType(
"datetime(6)");
735 b.Property<
long>(
"MergedById")
736 .HasColumnType(
"bigint");
738 b.Property<
int>(
"Number")
739 .HasColumnType(
"int");
741 b.Property<
long?>(
"PrimaryRevisionInformationId")
743 .HasColumnType(
"bigint");
745 b.Property<
string>(
"TargetCommitSha")
748 .HasColumnType(
"varchar(40)");
750 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"TargetCommitSha"),
"utf8mb4");
752 b.Property<
string>(
"TitleAtMerge")
754 .HasColumnType(
"longtext");
756 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"TitleAtMerge"),
"utf8mb4");
758 b.Property<
string>(
"Url")
760 .HasColumnType(
"longtext");
762 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Url"),
"utf8mb4");
766 b.HasIndex(
"MergedById");
768 b.HasIndex(
"PrimaryRevisionInformationId")
771 b.ToTable(
"TestMerges");
774 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
776 b.Property<
long?>(
"Id")
777 .ValueGeneratedOnAdd()
778 .HasColumnType(
"bigint");
780 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long?>(
"Id"));
782 b.Property<
string>(
"CanonicalName")
785 .HasColumnType(
"varchar(100)");
787 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"CanonicalName"),
"utf8mb4");
789 b.Property<DateTimeOffset?>(
"CreatedAt")
791 .HasColumnType(
"datetime(6)");
793 b.Property<
long?>(
"CreatedById")
794 .HasColumnType(
"bigint");
796 b.Property<
bool?>(
"Enabled")
798 .HasColumnType(
"tinyint(1)");
800 b.Property<
long?>(
"GroupId")
801 .HasColumnType(
"bigint");
803 b.Property<DateTimeOffset?>(
"LastPasswordUpdate")
804 .HasColumnType(
"datetime(6)");
806 b.Property<
string>(
"Name")
809 .HasColumnType(
"varchar(100)");
811 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Name"),
"utf8mb4");
813 b.Property<
string>(
"PasswordHash")
814 .HasColumnType(
"longtext");
816 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"PasswordHash"),
"utf8mb4");
818 b.Property<
string>(
"SystemIdentifier")
820 .HasColumnType(
"varchar(100)");
822 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"SystemIdentifier"),
"utf8mb4");
826 b.HasIndex(
"CanonicalName")
829 b.HasIndex(
"CreatedById");
831 b.HasIndex(
"GroupId");
833 b.HasIndex(
"SystemIdentifier")
839 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
841 b.Property<
long?>(
"Id")
842 .ValueGeneratedOnAdd()
843 .HasColumnType(
"bigint");
845 MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<
long?>(
"Id"));
847 b.Property<
string>(
"Name")
850 .HasColumnType(
"varchar(100)");
852 MySqlPropertyBuilderExtensions.HasCharSet(b.Property<
string>(
"Name"),
"utf8mb4");
862 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
864 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
865 .WithMany(
"ChatSettings")
866 .HasForeignKey(
"InstanceId")
867 .OnDelete(DeleteBehavior.Cascade)
870 b.Navigation(
"Instance");
873 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
875 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
876 .WithMany(
"Channels")
877 .HasForeignKey(
"ChatSettingsId")
878 .OnDelete(DeleteBehavior.Cascade)
881 b.Navigation(
"ChatSettings");
884 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
886 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
888 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
889 .OnDelete(DeleteBehavior.Cascade)
892 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
893 .WithMany(
"CompileJobs")
894 .HasForeignKey(
"RevisionInformationId")
895 .OnDelete(DeleteBehavior.Cascade)
900 b.Navigation(
"RevisionInformation");
903 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
905 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
906 .WithOne(
"DreamDaemonSettings")
907 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
908 .OnDelete(DeleteBehavior.Cascade)
911 b.Navigation(
"Instance");
914 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
916 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
917 .WithOne(
"DreamMakerSettings")
918 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
919 .OnDelete(DeleteBehavior.Cascade)
922 b.Navigation(
"Instance");
925 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
927 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
928 .WithMany(
"InstancePermissionSets")
929 .HasForeignKey(
"InstanceId")
930 .OnDelete(DeleteBehavior.Cascade)
933 b.HasOne(
"Tgstation.Server.Host.Models.PermissionSet",
"PermissionSet")
934 .WithMany(
"InstancePermissionSets")
935 .HasForeignKey(
"PermissionSetId")
936 .OnDelete(DeleteBehavior.Cascade)
939 b.Navigation(
"Instance");
941 b.Navigation(
"PermissionSet");
944 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
946 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
948 .HasForeignKey(
"CancelledById");
950 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
952 .HasForeignKey(
"InstanceId")
953 .OnDelete(DeleteBehavior.Cascade)
956 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
958 .HasForeignKey(
"StartedById")
959 .OnDelete(DeleteBehavior.Cascade)
962 b.Navigation(
"CancelledBy");
964 b.Navigation(
"Instance");
966 b.Navigation(
"StartedBy");
969 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
971 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
972 .WithMany(
"OAuthConnections")
973 .HasForeignKey(
"UserId")
974 .OnDelete(DeleteBehavior.Cascade);
976 b.Navigation(
"User");
979 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
981 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
982 .WithOne(
"PermissionSet")
983 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"GroupId")
984 .OnDelete(DeleteBehavior.Cascade);
986 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
987 .WithOne(
"PermissionSet")
988 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"UserId")
989 .OnDelete(DeleteBehavior.Cascade);
991 b.Navigation(
"Group");
993 b.Navigation(
"User");
996 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
998 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
1000 .HasForeignKey(
"CompileJobId")
1001 .OnDelete(DeleteBehavior.Cascade)
1004 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"InitialCompileJob")
1006 .HasForeignKey(
"InitialCompileJobId");
1008 b.Navigation(
"CompileJob");
1010 b.Navigation(
"InitialCompileJob");
1013 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
1015 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
1016 .WithOne(
"RepositorySettings")
1017 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
1018 .OnDelete(DeleteBehavior.Cascade)
1021 b.Navigation(
"Instance");
1024 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
1026 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
1027 .WithMany(
"ActiveTestMerges")
1028 .HasForeignKey(
"RevisionInformationId")
1029 .OnDelete(DeleteBehavior.Cascade)
1032 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
1033 .WithMany(
"RevisonInformations")
1034 .HasForeignKey(
"TestMergeId")
1035 .OnDelete(DeleteBehavior.ClientNoAction)
1038 b.Navigation(
"RevisionInformation");
1040 b.Navigation(
"TestMerge");
1043 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
1045 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
1046 .WithMany(
"RevisionInformations")
1047 .HasForeignKey(
"InstanceId")
1048 .OnDelete(DeleteBehavior.Cascade)
1051 b.Navigation(
"Instance");
1054 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
1056 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
1057 .WithMany(
"TestMerges")
1058 .HasForeignKey(
"MergedById")
1059 .OnDelete(DeleteBehavior.Restrict)
1062 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
1063 .WithOne(
"PrimaryTestMerge")
1064 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
1065 .OnDelete(DeleteBehavior.Cascade)
1068 b.Navigation(
"MergedBy");
1070 b.Navigation(
"PrimaryRevisionInformation");
1073 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
1075 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
1076 .WithMany(
"CreatedUsers")
1077 .HasForeignKey(
"CreatedById");
1079 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
1081 .HasForeignKey(
"GroupId");
1083 b.Navigation(
"CreatedBy");
1085 b.Navigation(
"Group");
1088 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
1090 b.Navigation(
"Channels");
1093 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
1095 b.Navigation(
"ChatSettings");
1097 b.Navigation(
"DreamDaemonSettings");
1099 b.Navigation(
"DreamMakerSettings");
1101 b.Navigation(
"InstancePermissionSets");
1103 b.Navigation(
"Jobs");
1105 b.Navigation(
"RepositorySettings");
1107 b.Navigation(
"RevisionInformations");
1110 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
1112 b.Navigation(
"InstancePermissionSets");
1115 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
1117 b.Navigation(
"ActiveTestMerges");
1119 b.Navigation(
"CompileJobs");
1121 b.Navigation(
"PrimaryTestMerge");
1124 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
1126 b.Navigation(
"RevisonInformations");
1129 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
1131 b.Navigation(
"CreatedUsers");
1133 b.Navigation(
"OAuthConnections");
1135 b.Navigation(
"PermissionSet");
1137 b.Navigation(
"TestMerges");
1140 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
1142 b.Navigation(
"PermissionSet")
1145 b.Navigation(
"Users");
1147#pragma warning restore 612, 618