16#pragma warning disable 612, 618
18 .HasAnnotation(
"ProductVersion",
"3.1.3")
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<Guid?>(
"DirectoryName")
117 .HasColumnType(
"char(36)");
119 b.Property<
string>(
"DmeName")
121 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
123 b.Property<
long>(
"JobId")
124 .HasColumnType(
"bigint");
126 b.Property<
int>(
"MinimumSecurityLevel")
127 .HasColumnType(
"int");
129 b.Property<
string>(
"Output")
131 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
133 b.Property<
long>(
"RevisionInformationId")
134 .HasColumnType(
"bigint");
138 b.HasIndex(
"DirectoryName");
143 b.HasIndex(
"RevisionInformationId");
145 b.ToTable(
"CompileJobs");
148 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
150 b.Property<
long>(
"Id")
151 .ValueGeneratedOnAdd()
152 .HasColumnType(
"bigint");
154 b.Property<
string>(
"AccessToken")
155 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
157 b.Property<
bool?>(
"AllowWebClient")
159 .HasColumnType(
"tinyint(1)");
161 b.Property<
bool?>(
"AutoStart")
163 .HasColumnType(
"tinyint(1)");
165 b.Property<
long>(
"InstanceId")
166 .HasColumnType(
"bigint");
168 b.Property<ushort?>(
"PrimaryPort")
170 .HasColumnType(
"smallint unsigned");
172 b.Property<
int?>(
"ProcessId")
173 .HasColumnType(
"int");
175 b.Property<ushort?>(
"SecondaryPort")
177 .HasColumnType(
"smallint unsigned");
179 b.Property<
int>(
"SecurityLevel")
180 .HasColumnType(
"int");
182 b.Property<
bool?>(
"SoftRestart")
184 .HasColumnType(
"tinyint(1)");
186 b.Property<
bool?>(
"SoftShutdown")
188 .HasColumnType(
"tinyint(1)");
190 b.Property<uint?>(
"StartupTimeout")
192 .HasColumnType(
"int unsigned");
196 b.HasIndex(
"InstanceId")
199 b.ToTable(
"DreamDaemonSettings");
202 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
204 b.Property<
long>(
"Id")
205 .ValueGeneratedOnAdd()
206 .HasColumnType(
"bigint");
208 b.Property<ushort?>(
"ApiValidationPort")
210 .HasColumnType(
"smallint unsigned");
212 b.Property<
int>(
"ApiValidationSecurityLevel")
213 .HasColumnType(
"int");
215 b.Property<
long>(
"InstanceId")
216 .HasColumnType(
"bigint");
218 b.Property<
string>(
"ProjectName")
219 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
220 .HasMaxLength(10000);
224 b.HasIndex(
"InstanceId")
227 b.ToTable(
"DreamMakerSettings");
230 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
232 b.Property<
long>(
"Id")
233 .ValueGeneratedOnAdd()
234 .HasColumnType(
"bigint");
236 b.Property<uint?>(
"AutoUpdateInterval")
238 .HasColumnType(
"int unsigned");
240 b.Property<ushort?>(
"ChatBotLimit")
242 .HasColumnType(
"smallint unsigned");
244 b.Property<
int>(
"ConfigurationType")
245 .HasColumnType(
"int");
247 b.Property<
string>(
"Name")
249 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
250 .HasMaxLength(10000);
252 b.Property<
bool?>(
"Online")
254 .HasColumnType(
"tinyint(1)");
256 b.Property<
string>(
"Path")
258 .HasColumnType(
"varchar(255) CHARACTER SET utf8mb4");
265 b.ToTable(
"Instances");
268 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstanceUser", b =>
270 b.Property<
long>(
"Id")
271 .ValueGeneratedOnAdd()
272 .HasColumnType(
"bigint");
274 b.Property<ulong>(
"ByondRights")
275 .HasColumnType(
"bigint unsigned");
277 b.Property<ulong>(
"ChatBotRights")
278 .HasColumnType(
"bigint unsigned");
280 b.Property<ulong>(
"ConfigurationRights")
281 .HasColumnType(
"bigint unsigned");
283 b.Property<ulong>(
"DreamDaemonRights")
284 .HasColumnType(
"bigint unsigned");
286 b.Property<ulong>(
"DreamMakerRights")
287 .HasColumnType(
"bigint unsigned");
289 b.Property<
long>(
"InstanceId")
290 .HasColumnType(
"bigint");
292 b.Property<ulong>(
"InstanceUserRights")
293 .HasColumnType(
"bigint unsigned");
295 b.Property<ulong>(
"RepositoryRights")
296 .HasColumnType(
"bigint unsigned");
298 b.Property<
long?>(
"UserId")
300 .HasColumnType(
"bigint");
304 b.HasIndex(
"InstanceId");
306 b.HasIndex(
"UserId",
"InstanceId")
309 b.ToTable(
"InstanceUsers");
312 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
314 b.Property<
long>(
"Id")
315 .ValueGeneratedOnAdd()
316 .HasColumnType(
"bigint");
318 b.Property<ulong?>(
"CancelRight")
319 .HasColumnType(
"bigint unsigned");
321 b.Property<ulong?>(
"CancelRightsType")
322 .HasColumnType(
"bigint unsigned");
324 b.Property<
bool?>(
"Cancelled")
326 .HasColumnType(
"tinyint(1)");
328 b.Property<
long?>(
"CancelledById")
329 .HasColumnType(
"bigint");
331 b.Property<
string>(
"Description")
333 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
335 b.Property<
string>(
"ExceptionDetails")
336 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
338 b.Property<
long>(
"InstanceId")
339 .HasColumnType(
"bigint");
341 b.Property<DateTimeOffset?>(
"StartedAt")
343 .HasColumnType(
"datetime(6)");
345 b.Property<
long>(
"StartedById")
346 .HasColumnType(
"bigint");
348 b.Property<DateTimeOffset?>(
"StoppedAt")
349 .HasColumnType(
"datetime(6)");
353 b.HasIndex(
"CancelledById");
355 b.HasIndex(
"InstanceId");
357 b.HasIndex(
"StartedById");
362 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
364 b.Property<
long>(
"Id")
365 .ValueGeneratedOnAdd()
366 .HasColumnType(
"bigint");
368 b.Property<
string>(
"AccessIdentifier")
370 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
372 b.Property<
string>(
"ChatChannelsJson")
374 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
376 b.Property<
string>(
"ChatCommandsJson")
378 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
380 b.Property<
long>(
"CompileJobId")
381 .HasColumnType(
"bigint");
383 b.Property<
bool>(
"IsPrimary")
384 .HasColumnType(
"tinyint(1)");
386 b.Property<ushort>(
"Port")
387 .HasColumnType(
"smallint unsigned");
389 b.Property<
int>(
"ProcessId")
390 .HasColumnType(
"int");
392 b.Property<
int>(
"RebootState")
393 .HasColumnType(
"int");
395 b.Property<
string>(
"ServerCommandsJson")
397 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
401 b.HasIndex(
"CompileJobId");
403 b.ToTable(
"ReattachInformations");
406 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
408 b.Property<
long>(
"Id")
409 .ValueGeneratedOnAdd()
410 .HasColumnType(
"bigint");
412 b.Property<
string>(
"AccessToken")
413 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
414 .HasMaxLength(10000);
416 b.Property<
string>(
"AccessUser")
417 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
418 .HasMaxLength(10000);
420 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
422 .HasColumnType(
"tinyint(1)");
424 b.Property<
bool?>(
"AutoUpdatesSynchronize")
426 .HasColumnType(
"tinyint(1)");
428 b.Property<
string>(
"CommitterEmail")
430 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
431 .HasMaxLength(10000);
433 b.Property<
string>(
"CommitterName")
435 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
436 .HasMaxLength(10000);
438 b.Property<
long>(
"InstanceId")
439 .HasColumnType(
"bigint");
441 b.Property<
bool?>(
"PostTestMergeComment")
443 .HasColumnType(
"tinyint(1)");
445 b.Property<
bool?>(
"PushTestMergeCommits")
447 .HasColumnType(
"tinyint(1)");
449 b.Property<
bool?>(
"ShowTestMergeCommitters")
451 .HasColumnType(
"tinyint(1)");
455 b.HasIndex(
"InstanceId")
458 b.ToTable(
"RepositorySettings");
461 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
463 b.Property<
long>(
"Id")
464 .ValueGeneratedOnAdd()
465 .HasColumnType(
"bigint");
467 b.Property<
long>(
"RevisionInformationId")
468 .HasColumnType(
"bigint");
470 b.Property<
long>(
"TestMergeId")
471 .HasColumnType(
"bigint");
475 b.HasIndex(
"RevisionInformationId");
477 b.HasIndex(
"TestMergeId");
479 b.ToTable(
"RevInfoTestMerges");
482 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
484 b.Property<
long>(
"Id")
485 .ValueGeneratedOnAdd()
486 .HasColumnType(
"bigint");
488 b.Property<
string>(
"CommitSha")
490 .HasColumnType(
"varchar(40) CHARACTER SET utf8mb4")
493 b.Property<
long>(
"InstanceId")
494 .HasColumnType(
"bigint");
496 b.Property<
string>(
"OriginCommitSha")
498 .HasColumnType(
"varchar(40) CHARACTER SET utf8mb4")
503 b.HasIndex(
"InstanceId",
"CommitSha")
506 b.ToTable(
"RevisionInformations");
509 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
511 b.Property<
long>(
"Id")
512 .ValueGeneratedOnAdd()
513 .HasColumnType(
"bigint");
515 b.Property<
string>(
"Author")
517 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
519 b.Property<
string>(
"BodyAtMerge")
521 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
523 b.Property<
string>(
"Comment")
524 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
525 .HasMaxLength(10000);
527 b.Property<DateTimeOffset>(
"MergedAt")
528 .HasColumnType(
"datetime(6)");
530 b.Property<
long>(
"MergedById")
531 .HasColumnType(
"bigint");
533 b.Property<
int>(
"Number")
534 .HasColumnType(
"int");
536 b.Property<
long?>(
"PrimaryRevisionInformationId")
538 .HasColumnType(
"bigint");
540 b.Property<
string>(
"PullRequestRevision")
542 .HasColumnType(
"varchar(40) CHARACTER SET utf8mb4")
545 b.Property<
string>(
"TitleAtMerge")
547 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
549 b.Property<
string>(
"Url")
551 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
555 b.HasIndex(
"MergedById");
557 b.HasIndex(
"PrimaryRevisionInformationId")
560 b.ToTable(
"TestMerges");
563 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
565 b.Property<
long?>(
"Id")
566 .ValueGeneratedOnAdd()
567 .HasColumnType(
"bigint");
569 b.Property<ulong>(
"AdministrationRights")
570 .HasColumnType(
"bigint unsigned");
572 b.Property<
string>(
"CanonicalName")
574 .HasColumnType(
"varchar(255) CHARACTER SET utf8mb4");
576 b.Property<DateTimeOffset?>(
"CreatedAt")
578 .HasColumnType(
"datetime(6)");
580 b.Property<
long?>(
"CreatedById")
581 .HasColumnType(
"bigint");
583 b.Property<
bool?>(
"Enabled")
585 .HasColumnType(
"tinyint(1)");
587 b.Property<ulong>(
"InstanceManagerRights")
588 .HasColumnType(
"bigint unsigned");
590 b.Property<DateTimeOffset?>(
"LastPasswordUpdate")
591 .HasColumnType(
"datetime(6)");
593 b.Property<
string>(
"Name")
595 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
596 .HasMaxLength(10000);
598 b.Property<
string>(
"PasswordHash")
599 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
601 b.Property<
string>(
"SystemIdentifier")
602 .HasColumnType(
"varchar(255) CHARACTER SET utf8mb4");
606 b.HasIndex(
"CanonicalName")
609 b.HasIndex(
"CreatedById");
611 b.HasIndex(
"SystemIdentifier")
617 modelBuilder.Entity(
"Tgstation.Server.Host.Models.WatchdogReattachInformation", b =>
619 b.Property<
long>(
"Id")
620 .ValueGeneratedOnAdd()
621 .HasColumnType(
"bigint");
623 b.Property<
long?>(
"AlphaId")
624 .HasColumnType(
"bigint");
626 b.Property<
bool>(
"AlphaIsActive")
627 .HasColumnType(
"tinyint(1)");
629 b.Property<
long?>(
"BravoId")
630 .HasColumnType(
"bigint");
632 b.Property<
long>(
"InstanceId")
633 .HasColumnType(
"bigint");
637 b.HasIndex(
"AlphaId");
639 b.HasIndex(
"BravoId");
641 b.HasIndex(
"InstanceId")
644 b.ToTable(
"WatchdogReattachInformations");
647 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
649 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
650 .WithMany(
"ChatSettings")
651 .HasForeignKey(
"InstanceId")
652 .OnDelete(DeleteBehavior.Cascade)
656 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
658 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
659 .WithMany(
"Channels")
660 .HasForeignKey(
"ChatSettingsId")
661 .OnDelete(DeleteBehavior.Cascade)
665 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
667 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
669 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
670 .OnDelete(DeleteBehavior.Restrict)
673 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
674 .WithMany(
"CompileJobs")
675 .HasForeignKey(
"RevisionInformationId")
676 .OnDelete(DeleteBehavior.Cascade)
680 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
682 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
683 .WithOne(
"DreamDaemonSettings")
684 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
685 .OnDelete(DeleteBehavior.Cascade)
689 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
691 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
692 .WithOne(
"DreamMakerSettings")
693 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
694 .OnDelete(DeleteBehavior.Cascade)
698 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstanceUser", b =>
700 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
701 .WithMany(
"InstanceUsers")
702 .HasForeignKey(
"InstanceId")
703 .OnDelete(DeleteBehavior.Cascade)
706 b.HasOne(
"Tgstation.Server.Host.Models.User",
null)
707 .WithMany(
"InstanceUsers")
708 .HasForeignKey(
"UserId")
709 .OnDelete(DeleteBehavior.Cascade)
713 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
715 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
717 .HasForeignKey(
"CancelledById");
719 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
721 .HasForeignKey(
"InstanceId")
722 .OnDelete(DeleteBehavior.Cascade)
725 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
727 .HasForeignKey(
"StartedById")
728 .OnDelete(DeleteBehavior.Cascade)
732 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
734 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
736 .HasForeignKey(
"CompileJobId")
737 .OnDelete(DeleteBehavior.Cascade)
741 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
743 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
744 .WithOne(
"RepositorySettings")
745 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
746 .OnDelete(DeleteBehavior.Cascade)
750 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
752 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
753 .WithMany(
"ActiveTestMerges")
754 .HasForeignKey(
"RevisionInformationId")
755 .OnDelete(DeleteBehavior.Cascade)
758 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
759 .WithMany(
"RevisonInformations")
760 .HasForeignKey(
"TestMergeId")
761 .OnDelete(DeleteBehavior.Cascade)
765 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
767 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
768 .WithMany(
"RevisionInformations")
769 .HasForeignKey(
"InstanceId")
770 .OnDelete(DeleteBehavior.Cascade)
774 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
776 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
777 .WithMany(
"TestMerges")
778 .HasForeignKey(
"MergedById")
779 .OnDelete(DeleteBehavior.Restrict)
782 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
783 .WithOne(
"PrimaryTestMerge")
784 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
785 .OnDelete(DeleteBehavior.Restrict)
789 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
791 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
792 .WithMany(
"CreatedUsers")
793 .HasForeignKey(
"CreatedById");
796 modelBuilder.Entity(
"Tgstation.Server.Host.Models.WatchdogReattachInformation", b =>
798 b.HasOne(
"Tgstation.Server.Host.Models.ReattachInformation",
"Alpha")
800 .HasForeignKey(
"AlphaId");
802 b.HasOne(
"Tgstation.Server.Host.Models.ReattachInformation",
"Bravo")
804 .HasForeignKey(
"BravoId");
806 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
null)
807 .WithOne(
"WatchdogReattachInformation")
808 .HasForeignKey(
"Tgstation.Server.Host.Models.WatchdogReattachInformation",
"InstanceId")
809 .OnDelete(DeleteBehavior.Cascade)
812#pragma warning restore 612, 618