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<
string>(
"RepositoryOrigin")
149 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
151 b.Property<
long>(
"RevisionInformationId")
152 .HasColumnType(
"bigint");
156 b.HasIndex(
"DirectoryName");
161 b.HasIndex(
"RevisionInformationId");
163 b.ToTable(
"CompileJobs");
166 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
168 b.Property<
long>(
"Id")
169 .ValueGeneratedOnAdd()
170 .HasColumnType(
"bigint");
172 b.Property<
string>(
"AdditionalParameters")
174 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
175 .HasMaxLength(10000);
177 b.Property<
bool?>(
"AllowWebClient")
179 .HasColumnType(
"tinyint(1)");
181 b.Property<
bool?>(
"AutoStart")
183 .HasColumnType(
"tinyint(1)");
185 b.Property<uint?>(
"HeartbeatSeconds")
187 .HasColumnType(
"int unsigned");
189 b.Property<
long>(
"InstanceId")
190 .HasColumnType(
"bigint");
192 b.Property<ushort?>(
"Port")
194 .HasColumnType(
"smallint unsigned");
196 b.Property<
int>(
"SecurityLevel")
197 .HasColumnType(
"int");
199 b.Property<uint?>(
"StartupTimeout")
201 .HasColumnType(
"int unsigned");
203 b.Property<uint?>(
"TopicRequestTimeout")
205 .HasColumnType(
"int unsigned");
209 b.HasIndex(
"InstanceId")
212 b.ToTable(
"DreamDaemonSettings");
215 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
217 b.Property<
long>(
"Id")
218 .ValueGeneratedOnAdd()
219 .HasColumnType(
"bigint");
221 b.Property<ushort?>(
"ApiValidationPort")
223 .HasColumnType(
"smallint unsigned");
225 b.Property<
int>(
"ApiValidationSecurityLevel")
226 .HasColumnType(
"int");
228 b.Property<
long>(
"InstanceId")
229 .HasColumnType(
"bigint");
231 b.Property<
string>(
"ProjectName")
232 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
233 .HasMaxLength(10000);
235 b.Property<
bool?>(
"RequireDMApiValidation")
237 .HasColumnType(
"tinyint(1)");
241 b.HasIndex(
"InstanceId")
244 b.ToTable(
"DreamMakerSettings");
247 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
249 b.Property<
long>(
"Id")
250 .ValueGeneratedOnAdd()
251 .HasColumnType(
"bigint");
253 b.Property<uint?>(
"AutoUpdateInterval")
255 .HasColumnType(
"int unsigned");
257 b.Property<ushort?>(
"ChatBotLimit")
259 .HasColumnType(
"smallint unsigned");
261 b.Property<
int>(
"ConfigurationType")
262 .HasColumnType(
"int");
264 b.Property<
string>(
"Name")
266 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
267 .HasMaxLength(10000);
269 b.Property<
bool?>(
"Online")
271 .HasColumnType(
"tinyint(1)");
273 b.Property<
string>(
"Path")
275 .HasColumnType(
"varchar(255) CHARACTER SET utf8mb4");
282 b.ToTable(
"Instances");
285 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstanceUser", b =>
287 b.Property<
long>(
"Id")
288 .ValueGeneratedOnAdd()
289 .HasColumnType(
"bigint");
291 b.Property<ulong>(
"ByondRights")
292 .HasColumnType(
"bigint unsigned");
294 b.Property<ulong>(
"ChatBotRights")
295 .HasColumnType(
"bigint unsigned");
297 b.Property<ulong>(
"ConfigurationRights")
298 .HasColumnType(
"bigint unsigned");
300 b.Property<ulong>(
"DreamDaemonRights")
301 .HasColumnType(
"bigint unsigned");
303 b.Property<ulong>(
"DreamMakerRights")
304 .HasColumnType(
"bigint unsigned");
306 b.Property<
long>(
"InstanceId")
307 .HasColumnType(
"bigint");
309 b.Property<ulong>(
"InstanceUserRights")
310 .HasColumnType(
"bigint unsigned");
312 b.Property<ulong>(
"RepositoryRights")
313 .HasColumnType(
"bigint unsigned");
315 b.Property<
long>(
"UserId")
316 .HasColumnType(
"bigint");
320 b.HasIndex(
"InstanceId");
322 b.HasIndex(
"UserId",
"InstanceId")
325 b.ToTable(
"InstanceUsers");
328 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
330 b.Property<
long>(
"Id")
331 .ValueGeneratedOnAdd()
332 .HasColumnType(
"bigint");
334 b.Property<ulong?>(
"CancelRight")
335 .HasColumnType(
"bigint unsigned");
337 b.Property<ulong?>(
"CancelRightsType")
338 .HasColumnType(
"bigint unsigned");
340 b.Property<
bool?>(
"Cancelled")
342 .HasColumnType(
"tinyint(1)");
344 b.Property<
long?>(
"CancelledById")
345 .HasColumnType(
"bigint");
347 b.Property<
string>(
"Description")
349 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
351 b.Property<uint?>(
"ErrorCode")
352 .HasColumnType(
"int unsigned");
354 b.Property<
string>(
"ExceptionDetails")
355 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
357 b.Property<
long>(
"InstanceId")
358 .HasColumnType(
"bigint");
360 b.Property<DateTimeOffset?>(
"StartedAt")
362 .HasColumnType(
"datetime(6)");
364 b.Property<
long>(
"StartedById")
365 .HasColumnType(
"bigint");
367 b.Property<DateTimeOffset?>(
"StoppedAt")
368 .HasColumnType(
"datetime(6)");
372 b.HasIndex(
"CancelledById");
374 b.HasIndex(
"InstanceId");
376 b.HasIndex(
"StartedById");
381 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
383 b.Property<
long>(
"Id")
384 .ValueGeneratedOnAdd()
385 .HasColumnType(
"bigint");
387 b.Property<
string>(
"ExternalUserId")
389 .HasColumnType(
"varchar(100) CHARACTER SET utf8mb4")
392 b.Property<
int>(
"Provider")
393 .HasColumnType(
"int");
395 b.Property<
long?>(
"UserId")
396 .HasColumnType(
"bigint");
400 b.HasIndex(
"UserId");
402 b.HasIndex(
"Provider",
"ExternalUserId")
405 b.ToTable(
"OAuthConnections");
408 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
410 b.Property<
long>(
"Id")
411 .ValueGeneratedOnAdd()
412 .HasColumnType(
"bigint");
414 b.Property<
string>(
"AccessIdentifier")
416 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
418 b.Property<
long>(
"CompileJobId")
419 .HasColumnType(
"bigint");
421 b.Property<
int>(
"LaunchSecurityLevel")
422 .HasColumnType(
"int");
424 b.Property<ushort>(
"Port")
425 .HasColumnType(
"smallint unsigned");
427 b.Property<
int>(
"ProcessId")
428 .HasColumnType(
"int");
430 b.Property<
int>(
"RebootState")
431 .HasColumnType(
"int");
435 b.HasIndex(
"CompileJobId");
437 b.ToTable(
"ReattachInformations");
440 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
442 b.Property<
long>(
"Id")
443 .ValueGeneratedOnAdd()
444 .HasColumnType(
"bigint");
446 b.Property<
string>(
"AccessToken")
447 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
448 .HasMaxLength(10000);
450 b.Property<
string>(
"AccessUser")
451 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
452 .HasMaxLength(10000);
454 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
456 .HasColumnType(
"tinyint(1)");
458 b.Property<
bool?>(
"AutoUpdatesSynchronize")
460 .HasColumnType(
"tinyint(1)");
462 b.Property<
string>(
"CommitterEmail")
464 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
465 .HasMaxLength(10000);
467 b.Property<
string>(
"CommitterName")
469 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
470 .HasMaxLength(10000);
472 b.Property<
bool?>(
"CreateGitHubDeployments")
474 .HasColumnType(
"tinyint(1)");
476 b.Property<
long>(
"InstanceId")
477 .HasColumnType(
"bigint");
479 b.Property<
bool?>(
"PostTestMergeComment")
481 .HasColumnType(
"tinyint(1)");
483 b.Property<
bool?>(
"PushTestMergeCommits")
485 .HasColumnType(
"tinyint(1)");
487 b.Property<
bool?>(
"ShowTestMergeCommitters")
489 .HasColumnType(
"tinyint(1)");
493 b.HasIndex(
"InstanceId")
496 b.ToTable(
"RepositorySettings");
499 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
501 b.Property<
long>(
"Id")
502 .ValueGeneratedOnAdd()
503 .HasColumnType(
"bigint");
505 b.Property<
long>(
"RevisionInformationId")
506 .HasColumnType(
"bigint");
508 b.Property<
long>(
"TestMergeId")
509 .HasColumnType(
"bigint");
513 b.HasIndex(
"RevisionInformationId");
515 b.HasIndex(
"TestMergeId");
517 b.ToTable(
"RevInfoTestMerges");
520 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
522 b.Property<
long>(
"Id")
523 .ValueGeneratedOnAdd()
524 .HasColumnType(
"bigint");
526 b.Property<
string>(
"CommitSha")
528 .HasColumnType(
"varchar(40) CHARACTER SET utf8mb4")
531 b.Property<
long>(
"InstanceId")
532 .HasColumnType(
"bigint");
534 b.Property<
string>(
"OriginCommitSha")
536 .HasColumnType(
"varchar(40) CHARACTER SET utf8mb4")
541 b.HasIndex(
"InstanceId",
"CommitSha")
544 b.ToTable(
"RevisionInformations");
547 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
549 b.Property<
long>(
"Id")
550 .ValueGeneratedOnAdd()
551 .HasColumnType(
"bigint");
553 b.Property<
string>(
"Author")
555 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
557 b.Property<
string>(
"BodyAtMerge")
559 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
561 b.Property<
string>(
"Comment")
562 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
563 .HasMaxLength(10000);
565 b.Property<DateTimeOffset>(
"MergedAt")
566 .HasColumnType(
"datetime(6)");
568 b.Property<
long>(
"MergedById")
569 .HasColumnType(
"bigint");
571 b.Property<
int>(
"Number")
572 .HasColumnType(
"int");
574 b.Property<
long?>(
"PrimaryRevisionInformationId")
576 .HasColumnType(
"bigint");
578 b.Property<
string>(
"TargetCommitSha")
580 .HasColumnType(
"varchar(40) CHARACTER SET utf8mb4")
583 b.Property<
string>(
"TitleAtMerge")
585 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
587 b.Property<
string>(
"Url")
589 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
593 b.HasIndex(
"MergedById");
595 b.HasIndex(
"PrimaryRevisionInformationId")
598 b.ToTable(
"TestMerges");
601 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
603 b.Property<
long?>(
"Id")
604 .ValueGeneratedOnAdd()
605 .HasColumnType(
"bigint");
607 b.Property<ulong>(
"AdministrationRights")
608 .HasColumnType(
"bigint unsigned");
610 b.Property<
string>(
"CanonicalName")
612 .HasColumnType(
"varchar(255) CHARACTER SET utf8mb4");
614 b.Property<DateTimeOffset?>(
"CreatedAt")
616 .HasColumnType(
"datetime(6)");
618 b.Property<
long?>(
"CreatedById")
619 .HasColumnType(
"bigint");
621 b.Property<
bool?>(
"Enabled")
623 .HasColumnType(
"tinyint(1)");
625 b.Property<ulong>(
"InstanceManagerRights")
626 .HasColumnType(
"bigint unsigned");
628 b.Property<DateTimeOffset?>(
"LastPasswordUpdate")
629 .HasColumnType(
"datetime(6)");
631 b.Property<
string>(
"Name")
633 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
634 .HasMaxLength(10000);
636 b.Property<
string>(
"PasswordHash")
637 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
639 b.Property<
string>(
"SystemIdentifier")
640 .HasColumnType(
"varchar(255) CHARACTER SET utf8mb4");
644 b.HasIndex(
"CanonicalName")
647 b.HasIndex(
"CreatedById");
649 b.HasIndex(
"SystemIdentifier")
655 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
657 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
658 .WithMany(
"ChatSettings")
659 .HasForeignKey(
"InstanceId")
660 .OnDelete(DeleteBehavior.Cascade)
664 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
666 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
667 .WithMany(
"Channels")
668 .HasForeignKey(
"ChatSettingsId")
669 .OnDelete(DeleteBehavior.Cascade)
673 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
675 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
677 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
678 .OnDelete(DeleteBehavior.Cascade)
681 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
682 .WithMany(
"CompileJobs")
683 .HasForeignKey(
"RevisionInformationId")
684 .OnDelete(DeleteBehavior.Cascade)
688 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
690 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
691 .WithOne(
"DreamDaemonSettings")
692 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
693 .OnDelete(DeleteBehavior.Cascade)
697 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
699 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
700 .WithOne(
"DreamMakerSettings")
701 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
702 .OnDelete(DeleteBehavior.Cascade)
706 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstanceUser", b =>
708 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
709 .WithMany(
"InstanceUsers")
710 .HasForeignKey(
"InstanceId")
711 .OnDelete(DeleteBehavior.Cascade)
714 b.HasOne(
"Tgstation.Server.Host.Models.User",
null)
715 .WithMany(
"InstanceUsers")
716 .HasForeignKey(
"UserId")
717 .OnDelete(DeleteBehavior.Cascade)
721 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
723 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
725 .HasForeignKey(
"CancelledById");
727 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
729 .HasForeignKey(
"InstanceId")
730 .OnDelete(DeleteBehavior.Cascade)
733 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
735 .HasForeignKey(
"StartedById")
736 .OnDelete(DeleteBehavior.Cascade)
740 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
742 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
743 .WithMany(
"OAuthConnections")
744 .HasForeignKey(
"UserId")
745 .OnDelete(DeleteBehavior.Cascade);
748 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
750 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
752 .HasForeignKey(
"CompileJobId")
753 .OnDelete(DeleteBehavior.Cascade)
757 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
759 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
760 .WithOne(
"RepositorySettings")
761 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
762 .OnDelete(DeleteBehavior.Cascade)
766 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
768 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
769 .WithMany(
"ActiveTestMerges")
770 .HasForeignKey(
"RevisionInformationId")
771 .OnDelete(DeleteBehavior.Cascade)
774 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
775 .WithMany(
"RevisonInformations")
776 .HasForeignKey(
"TestMergeId")
777 .OnDelete(DeleteBehavior.ClientNoAction)
781 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
783 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
784 .WithMany(
"RevisionInformations")
785 .HasForeignKey(
"InstanceId")
786 .OnDelete(DeleteBehavior.Cascade)
790 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
792 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
793 .WithMany(
"TestMerges")
794 .HasForeignKey(
"MergedById")
795 .OnDelete(DeleteBehavior.Restrict)
798 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
799 .WithOne(
"PrimaryTestMerge")
800 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
801 .OnDelete(DeleteBehavior.Cascade)
805 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
807 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
808 .WithMany(
"CreatedUsers")
809 .HasForeignKey(
"CreatedById");
811#pragma warning restore 612, 618