16#pragma warning disable 612, 618
18 .HasAnnotation(
"ProductVersion",
"3.1.10")
19 .HasAnnotation(
"Relational:MaxIdentifierLength", 64);
21 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
23 b.Property<
long>(
"Id")
24 .ValueGeneratedOnAdd()
25 .HasColumnType(
"bigint");
27 b.Property<ushort?>(
"ChannelLimit")
29 .HasColumnType(
"smallint unsigned");
31 b.Property<
string>(
"ConnectionString")
33 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
36 b.Property<
bool?>(
"Enabled")
37 .HasColumnType(
"tinyint(1)");
39 b.Property<
long>(
"InstanceId")
40 .HasColumnType(
"bigint");
42 b.Property<
string>(
"Name")
44 .HasColumnType(
"varchar(100) CHARACTER SET utf8mb4")
47 b.Property<
int>(
"Provider")
48 .HasColumnType(
"int");
50 b.Property<uint?>(
"ReconnectionInterval")
52 .HasColumnType(
"int unsigned");
56 b.HasIndex(
"InstanceId",
"Name")
59 b.ToTable(
"ChatBots");
62 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
64 b.Property<
long>(
"Id")
65 .ValueGeneratedOnAdd()
66 .HasColumnType(
"bigint");
68 b.Property<
long>(
"ChatSettingsId")
69 .HasColumnType(
"bigint");
71 b.Property<ulong?>(
"DiscordChannelId")
72 .HasColumnType(
"bigint unsigned");
74 b.Property<
string>(
"IrcChannel")
75 .HasColumnType(
"varchar(100) CHARACTER SET utf8mb4")
78 b.Property<
bool?>(
"IsAdminChannel")
80 .HasColumnType(
"tinyint(1)");
82 b.Property<
bool?>(
"IsUpdatesChannel")
84 .HasColumnType(
"tinyint(1)");
86 b.Property<
bool?>(
"IsWatchdogChannel")
88 .HasColumnType(
"tinyint(1)");
90 b.Property<
string>(
"Tag")
91 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
96 b.HasIndex(
"ChatSettingsId",
"DiscordChannelId")
99 b.HasIndex(
"ChatSettingsId",
"IrcChannel")
102 b.ToTable(
"ChatChannels");
105 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
107 b.Property<
long>(
"Id")
108 .ValueGeneratedOnAdd()
109 .HasColumnType(
"bigint");
111 b.Property<
string>(
"ByondVersion")
113 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
115 b.Property<
int?>(
"DMApiMajorVersion")
116 .HasColumnType(
"int");
118 b.Property<
int?>(
"DMApiMinorVersion")
119 .HasColumnType(
"int");
121 b.Property<
int?>(
"DMApiPatchVersion")
122 .HasColumnType(
"int");
124 b.Property<Guid?>(
"DirectoryName")
126 .HasColumnType(
"char(36)");
128 b.Property<
string>(
"DmeName")
130 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
132 b.Property<
int?>(
"GitHubDeploymentId")
133 .HasColumnType(
"int");
135 b.Property<
long?>(
"GitHubRepoId")
136 .HasColumnType(
"bigint");
138 b.Property<
long>(
"JobId")
139 .HasColumnType(
"bigint");
141 b.Property<
int?>(
"MinimumSecurityLevel")
142 .HasColumnType(
"int");
144 b.Property<
string>(
"Output")
146 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
148 b.Property<
long>(
"RevisionInformationId")
149 .HasColumnType(
"bigint");
153 b.HasIndex(
"DirectoryName");
158 b.HasIndex(
"RevisionInformationId");
160 b.ToTable(
"CompileJobs");
163 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
165 b.Property<
long>(
"Id")
166 .ValueGeneratedOnAdd()
167 .HasColumnType(
"bigint");
169 b.Property<
string>(
"AdditionalParameters")
171 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
172 .HasMaxLength(10000);
174 b.Property<
bool?>(
"AllowWebClient")
176 .HasColumnType(
"tinyint(1)");
178 b.Property<
bool?>(
"AutoStart")
180 .HasColumnType(
"tinyint(1)");
182 b.Property<uint?>(
"HeartbeatSeconds")
184 .HasColumnType(
"int unsigned");
186 b.Property<
long>(
"InstanceId")
187 .HasColumnType(
"bigint");
189 b.Property<ushort?>(
"Port")
191 .HasColumnType(
"smallint unsigned");
193 b.Property<
int>(
"SecurityLevel")
194 .HasColumnType(
"int");
196 b.Property<uint?>(
"StartupTimeout")
198 .HasColumnType(
"int unsigned");
200 b.Property<uint?>(
"TopicRequestTimeout")
202 .HasColumnType(
"int unsigned");
206 b.HasIndex(
"InstanceId")
209 b.ToTable(
"DreamDaemonSettings");
212 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
214 b.Property<
long>(
"Id")
215 .ValueGeneratedOnAdd()
216 .HasColumnType(
"bigint");
218 b.Property<ushort?>(
"ApiValidationPort")
220 .HasColumnType(
"smallint unsigned");
222 b.Property<
int>(
"ApiValidationSecurityLevel")
223 .HasColumnType(
"int");
225 b.Property<
long>(
"InstanceId")
226 .HasColumnType(
"bigint");
228 b.Property<
string>(
"ProjectName")
229 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
230 .HasMaxLength(10000);
232 b.Property<
bool?>(
"RequireDMApiValidation")
234 .HasColumnType(
"tinyint(1)");
238 b.HasIndex(
"InstanceId")
241 b.ToTable(
"DreamMakerSettings");
244 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
246 b.Property<
long>(
"Id")
247 .ValueGeneratedOnAdd()
248 .HasColumnType(
"bigint");
250 b.Property<uint?>(
"AutoUpdateInterval")
252 .HasColumnType(
"int unsigned");
254 b.Property<ushort?>(
"ChatBotLimit")
256 .HasColumnType(
"smallint unsigned");
258 b.Property<
int>(
"ConfigurationType")
259 .HasColumnType(
"int");
261 b.Property<
string>(
"Name")
263 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
264 .HasMaxLength(10000);
266 b.Property<
bool?>(
"Online")
268 .HasColumnType(
"tinyint(1)");
270 b.Property<
string>(
"Path")
272 .HasColumnType(
"varchar(255) CHARACTER SET utf8mb4");
279 b.ToTable(
"Instances");
282 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstanceUser", b =>
284 b.Property<
long>(
"Id")
285 .ValueGeneratedOnAdd()
286 .HasColumnType(
"bigint");
288 b.Property<ulong>(
"ByondRights")
289 .HasColumnType(
"bigint unsigned");
291 b.Property<ulong>(
"ChatBotRights")
292 .HasColumnType(
"bigint unsigned");
294 b.Property<ulong>(
"ConfigurationRights")
295 .HasColumnType(
"bigint unsigned");
297 b.Property<ulong>(
"DreamDaemonRights")
298 .HasColumnType(
"bigint unsigned");
300 b.Property<ulong>(
"DreamMakerRights")
301 .HasColumnType(
"bigint unsigned");
303 b.Property<
long>(
"InstanceId")
304 .HasColumnType(
"bigint");
306 b.Property<ulong>(
"InstanceUserRights")
307 .HasColumnType(
"bigint unsigned");
309 b.Property<ulong>(
"RepositoryRights")
310 .HasColumnType(
"bigint unsigned");
312 b.Property<
long>(
"UserId")
313 .HasColumnType(
"bigint");
317 b.HasIndex(
"InstanceId");
319 b.HasIndex(
"UserId",
"InstanceId")
322 b.ToTable(
"InstanceUsers");
325 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
327 b.Property<
long>(
"Id")
328 .ValueGeneratedOnAdd()
329 .HasColumnType(
"bigint");
331 b.Property<ulong?>(
"CancelRight")
332 .HasColumnType(
"bigint unsigned");
334 b.Property<ulong?>(
"CancelRightsType")
335 .HasColumnType(
"bigint unsigned");
337 b.Property<
bool?>(
"Cancelled")
339 .HasColumnType(
"tinyint(1)");
341 b.Property<
long?>(
"CancelledById")
342 .HasColumnType(
"bigint");
344 b.Property<
string>(
"Description")
346 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
348 b.Property<uint?>(
"ErrorCode")
349 .HasColumnType(
"int unsigned");
351 b.Property<
string>(
"ExceptionDetails")
352 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
354 b.Property<
long>(
"InstanceId")
355 .HasColumnType(
"bigint");
357 b.Property<DateTimeOffset?>(
"StartedAt")
359 .HasColumnType(
"datetime(6)");
361 b.Property<
long>(
"StartedById")
362 .HasColumnType(
"bigint");
364 b.Property<DateTimeOffset?>(
"StoppedAt")
365 .HasColumnType(
"datetime(6)");
369 b.HasIndex(
"CancelledById");
371 b.HasIndex(
"InstanceId");
373 b.HasIndex(
"StartedById");
378 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
380 b.Property<
long>(
"Id")
381 .ValueGeneratedOnAdd()
382 .HasColumnType(
"bigint");
384 b.Property<
string>(
"ExternalUserId")
386 .HasColumnType(
"varchar(100) CHARACTER SET utf8mb4")
389 b.Property<
int>(
"Provider")
390 .HasColumnType(
"int");
392 b.Property<
long?>(
"UserId")
393 .HasColumnType(
"bigint");
397 b.HasIndex(
"UserId");
399 b.HasIndex(
"Provider",
"ExternalUserId")
402 b.ToTable(
"OAuthConnections");
405 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
407 b.Property<
long>(
"Id")
408 .ValueGeneratedOnAdd()
409 .HasColumnType(
"bigint");
411 b.Property<
string>(
"AccessIdentifier")
413 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
415 b.Property<
long>(
"CompileJobId")
416 .HasColumnType(
"bigint");
418 b.Property<
int>(
"LaunchSecurityLevel")
419 .HasColumnType(
"int");
421 b.Property<ushort>(
"Port")
422 .HasColumnType(
"smallint unsigned");
424 b.Property<
int>(
"ProcessId")
425 .HasColumnType(
"int");
427 b.Property<
int>(
"RebootState")
428 .HasColumnType(
"int");
432 b.HasIndex(
"CompileJobId");
434 b.ToTable(
"ReattachInformations");
437 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
439 b.Property<
long>(
"Id")
440 .ValueGeneratedOnAdd()
441 .HasColumnType(
"bigint");
443 b.Property<
string>(
"AccessToken")
444 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
445 .HasMaxLength(10000);
447 b.Property<
string>(
"AccessUser")
448 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
449 .HasMaxLength(10000);
451 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
453 .HasColumnType(
"tinyint(1)");
455 b.Property<
bool?>(
"AutoUpdatesSynchronize")
457 .HasColumnType(
"tinyint(1)");
459 b.Property<
string>(
"CommitterEmail")
461 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
462 .HasMaxLength(10000);
464 b.Property<
string>(
"CommitterName")
466 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
467 .HasMaxLength(10000);
469 b.Property<
bool?>(
"CreateGitHubDeployments")
471 .HasColumnType(
"tinyint(1)");
473 b.Property<
long>(
"InstanceId")
474 .HasColumnType(
"bigint");
476 b.Property<
bool?>(
"PostTestMergeComment")
478 .HasColumnType(
"tinyint(1)");
480 b.Property<
bool?>(
"PushTestMergeCommits")
482 .HasColumnType(
"tinyint(1)");
484 b.Property<
bool?>(
"ShowTestMergeCommitters")
486 .HasColumnType(
"tinyint(1)");
490 b.HasIndex(
"InstanceId")
493 b.ToTable(
"RepositorySettings");
496 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
498 b.Property<
long>(
"Id")
499 .ValueGeneratedOnAdd()
500 .HasColumnType(
"bigint");
502 b.Property<
long>(
"RevisionInformationId")
503 .HasColumnType(
"bigint");
505 b.Property<
long>(
"TestMergeId")
506 .HasColumnType(
"bigint");
510 b.HasIndex(
"RevisionInformationId");
512 b.HasIndex(
"TestMergeId");
514 b.ToTable(
"RevInfoTestMerges");
517 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
519 b.Property<
long>(
"Id")
520 .ValueGeneratedOnAdd()
521 .HasColumnType(
"bigint");
523 b.Property<
string>(
"CommitSha")
525 .HasColumnType(
"varchar(40) CHARACTER SET utf8mb4")
528 b.Property<
long>(
"InstanceId")
529 .HasColumnType(
"bigint");
531 b.Property<
string>(
"OriginCommitSha")
533 .HasColumnType(
"varchar(40) CHARACTER SET utf8mb4")
538 b.HasIndex(
"InstanceId",
"CommitSha")
541 b.ToTable(
"RevisionInformations");
544 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
546 b.Property<
long>(
"Id")
547 .ValueGeneratedOnAdd()
548 .HasColumnType(
"bigint");
550 b.Property<
string>(
"Author")
552 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
554 b.Property<
string>(
"BodyAtMerge")
556 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
558 b.Property<
string>(
"Comment")
559 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
560 .HasMaxLength(10000);
562 b.Property<DateTimeOffset>(
"MergedAt")
563 .HasColumnType(
"datetime(6)");
565 b.Property<
long>(
"MergedById")
566 .HasColumnType(
"bigint");
568 b.Property<
int>(
"Number")
569 .HasColumnType(
"int");
571 b.Property<
long?>(
"PrimaryRevisionInformationId")
573 .HasColumnType(
"bigint");
575 b.Property<
string>(
"PullRequestRevision")
577 .HasColumnType(
"varchar(40) CHARACTER SET utf8mb4")
580 b.Property<
string>(
"TitleAtMerge")
582 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
584 b.Property<
string>(
"Url")
586 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
590 b.HasIndex(
"MergedById");
592 b.HasIndex(
"PrimaryRevisionInformationId")
595 b.ToTable(
"TestMerges");
598 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
600 b.Property<
long?>(
"Id")
601 .ValueGeneratedOnAdd()
602 .HasColumnType(
"bigint");
604 b.Property<ulong>(
"AdministrationRights")
605 .HasColumnType(
"bigint unsigned");
607 b.Property<
string>(
"CanonicalName")
609 .HasColumnType(
"varchar(255) CHARACTER SET utf8mb4");
611 b.Property<DateTimeOffset?>(
"CreatedAt")
613 .HasColumnType(
"datetime(6)");
615 b.Property<
long?>(
"CreatedById")
616 .HasColumnType(
"bigint");
618 b.Property<
bool?>(
"Enabled")
620 .HasColumnType(
"tinyint(1)");
622 b.Property<ulong>(
"InstanceManagerRights")
623 .HasColumnType(
"bigint unsigned");
625 b.Property<DateTimeOffset?>(
"LastPasswordUpdate")
626 .HasColumnType(
"datetime(6)");
628 b.Property<
string>(
"Name")
630 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
631 .HasMaxLength(10000);
633 b.Property<
string>(
"PasswordHash")
634 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
636 b.Property<
string>(
"SystemIdentifier")
637 .HasColumnType(
"varchar(255) CHARACTER SET utf8mb4");
641 b.HasIndex(
"CanonicalName")
644 b.HasIndex(
"CreatedById");
646 b.HasIndex(
"SystemIdentifier")
652 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
654 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
655 .WithMany(
"ChatSettings")
656 .HasForeignKey(
"InstanceId")
657 .OnDelete(DeleteBehavior.Cascade)
661 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
663 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
664 .WithMany(
"Channels")
665 .HasForeignKey(
"ChatSettingsId")
666 .OnDelete(DeleteBehavior.Cascade)
670 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
672 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
674 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
675 .OnDelete(DeleteBehavior.Cascade)
678 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
679 .WithMany(
"CompileJobs")
680 .HasForeignKey(
"RevisionInformationId")
681 .OnDelete(DeleteBehavior.Cascade)
685 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
687 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
688 .WithOne(
"DreamDaemonSettings")
689 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
690 .OnDelete(DeleteBehavior.Cascade)
694 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
696 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
697 .WithOne(
"DreamMakerSettings")
698 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
699 .OnDelete(DeleteBehavior.Cascade)
703 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstanceUser", b =>
705 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
706 .WithMany(
"InstanceUsers")
707 .HasForeignKey(
"InstanceId")
708 .OnDelete(DeleteBehavior.Cascade)
711 b.HasOne(
"Tgstation.Server.Host.Models.User",
null)
712 .WithMany(
"InstanceUsers")
713 .HasForeignKey(
"UserId")
714 .OnDelete(DeleteBehavior.Cascade)
718 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
720 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
722 .HasForeignKey(
"CancelledById");
724 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
726 .HasForeignKey(
"InstanceId")
727 .OnDelete(DeleteBehavior.Cascade)
730 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
732 .HasForeignKey(
"StartedById")
733 .OnDelete(DeleteBehavior.Cascade)
737 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
739 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
740 .WithMany(
"OAuthConnections")
741 .HasForeignKey(
"UserId")
742 .OnDelete(DeleteBehavior.Cascade);
745 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
747 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
749 .HasForeignKey(
"CompileJobId")
750 .OnDelete(DeleteBehavior.Cascade)
754 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
756 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
757 .WithOne(
"RepositorySettings")
758 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
759 .OnDelete(DeleteBehavior.Cascade)
763 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
765 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
766 .WithMany(
"ActiveTestMerges")
767 .HasForeignKey(
"RevisionInformationId")
768 .OnDelete(DeleteBehavior.Cascade)
771 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
772 .WithMany(
"RevisonInformations")
773 .HasForeignKey(
"TestMergeId")
774 .OnDelete(DeleteBehavior.ClientNoAction)
778 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
780 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
781 .WithMany(
"RevisionInformations")
782 .HasForeignKey(
"InstanceId")
783 .OnDelete(DeleteBehavior.Cascade)
787 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
789 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
790 .WithMany(
"TestMerges")
791 .HasForeignKey(
"MergedById")
792 .OnDelete(DeleteBehavior.Restrict)
795 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
796 .WithOne(
"PrimaryTestMerge")
797 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
798 .OnDelete(DeleteBehavior.Cascade)
802 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
804 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
805 .WithMany(
"CreatedUsers")
806 .HasForeignKey(
"CreatedById");
808#pragma warning restore 612, 618